mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
29 lines
571 B
Java
29 lines
571 B
Java
package com.hbm.wiaj.actions;
|
|
|
|
import com.hbm.wiaj.JarScene;
|
|
import com.hbm.wiaj.WorldInAJar;
|
|
|
|
public class ActionRotate implements IJarAction {
|
|
|
|
int time;
|
|
double velYaw;
|
|
double velPitch;
|
|
|
|
public ActionRotate(double yaw, double pitch, int time) {
|
|
this.velYaw = yaw / (time + 1);
|
|
this.velPitch = pitch / (time + 1);
|
|
this.time = time;
|
|
}
|
|
|
|
@Override
|
|
public int getDuration() {
|
|
return this.time;
|
|
}
|
|
|
|
@Override
|
|
public void act(WorldInAJar world, JarScene scene) {
|
|
scene.script.rotationPitch += this.velPitch;
|
|
scene.script.rotationYaw += this.velYaw;
|
|
}
|
|
}
|