animations: set blank shaders on task start
This commit is contained in:
parent
dbfc79046e
commit
7e90dd5a22
@ -37,7 +37,9 @@ impl<T: Surface> IdleTask<T> {
|
||||
}
|
||||
|
||||
impl<T: Surface> Task for IdleTask<T> {
|
||||
fn name(&self) -> &'static str { "Idle" }
|
||||
fn start(&mut self) {
|
||||
self.surface.set_shader(Box::new(IdleShader { frame: self.frame }));
|
||||
}
|
||||
|
||||
fn tick(&mut self) {
|
||||
self.updater.run(|| {
|
||||
@ -114,7 +116,9 @@ impl<T: Surface> TestPattern<T> {
|
||||
}
|
||||
|
||||
impl<T: Surface> Task for TestPattern<T> {
|
||||
fn name(&self) -> &'static str { "Idle" }
|
||||
fn start(&mut self) {
|
||||
self.surface.set_shader(Box::new(TestShader { pattern: self.pattern }));
|
||||
}
|
||||
|
||||
fn tick(&mut self) {
|
||||
self.updater.run(|| {
|
||||
|
Loading…
x
Reference in New Issue
Block a user