DroidQuest/src/com/droidquest/items/Wave.java

25 lines
606 B
Java
Raw Normal View History

2014-02-02 18:39:08 -03:00
package com.droidquest.items;
import com.droidquest.Room;
public class Wave extends HiddenCamera {
private int animationState;
private int animationDir = 1;
2014-02-02 18:39:08 -03:00
public Wave(Room r) {
super(r);
}
2014-02-02 18:39:08 -03:00
public void Animate() {
animationState += animationDir;
if (animationState == 0 || animationState == 56) {
animationDir = -animationDir;
}
if (animationState % 8 == 0) {
int Y = (animationState / 8) + 1;
room.SetMaterialFill(3, 1, 14, 10, 8);
room.SetMaterialFill(3, Y, 14, Y + 2, 0);
}
}
2014-02-02 18:39:08 -03:00
}