Newer
Older
CactusServer / src / main / java / fight3D / StateUpperAttack.java
y-ota on 10 May 2018 902 bytes 初うp
  1. package fight3D;
  2. import framework.gameMain.Mode;
  3. import framework.physics.Velocity3D;
  4.  
  5.  
  6. public class StateUpperAttack extends StateOnce {
  7. static final Velocity3D initialVelocity = new Velocity3D(0.0, 0.0, 0.0);
  8.  
  9. @Override
  10. public boolean canChange(State nextState, Mode mode) {
  11. if (nextState instanceof StateAttack) return false;
  12. if (nextState instanceof StateUpperAttack) return false;
  13. if (nextState instanceof StateJumpAttack) return false;
  14. if (nextState instanceof StateNormalLeft) return false;
  15. if (nextState instanceof StateNormalRight) return false;
  16. if(nextState instanceof StateFlinch) return true;
  17. if(nextState instanceof StateDamaged) return true;
  18. return false;
  19. }
  20.  
  21. @Override
  22. public Velocity3D getInitialVelocity() {
  23. // ジャンプ開始直後は対空攻撃ができるので、その場合はジャンプを中断する(落下させる)
  24. return initialVelocity;
  25. }
  26.  
  27. }