Exemplo n.º 1
0
 public IState changeState()
 {
     IState newState = new Moving(stateable);
     if(fire){
         //[SOUND] estas debajo de megatron
     newState = new Shooting(stateable);
     }
     return newState;
 }
Exemplo n.º 2
0
 public IState changeState()
 {
     IState newState = null;
     if (timeElapsed > updateRating) {
         stateable.GetComponent<IMoveable> ().SetSpeed (Vector3.zero);
         timeElapsed = 0;
         newState = new Thinking(stateable);
     }else if(fire){
         stateable.GetComponent<IMoveable> ().SetSpeed (Vector3.zero);
         newState = new Shooting(stateable);
     }
     return newState;
 }