Ejemplo n.º 1
0
 public void moveCharacter(CharactersController characterCtrl, Vector3 destination)
 {
     Vector3 currentPos = characterCtrl.getPos();
     Vector3 middlePos = currentPos;
     if (destination.y > currentPos.y)
     {       //from low(boat) to high(coast)
         middlePos.y = destination.y;
     }
     else
     {   //from high(coast) to low(boat)
         middlePos.x = destination.x;
     }
     ObjAction action1 = MoveToAction.getAction(middlePos, characterCtrl.movingSpeed);
     ObjAction action2 = MoveToAction.getAction(destination, characterCtrl.movingSpeed);
     ObjAction seqAction = SequenceAction.getAction(1, 0, new List<ObjAction> { action1, action2 });
     this.addAction(characterCtrl.getGameobj(), seqAction, this);
 }
 public void putACharacter(CharactersController characterscontroller)
 {
     indexCharactersOnBank[characterscontroller.getCharacterIndex()] = characterscontroller.getType();
 }
 public void removeACharacter(CharactersController characterscontroller)
 {
     indexCharactersOnBank[characterscontroller.getCharacterIndex()] = -1;
 }
Ejemplo n.º 4
0
 public void setController(CharactersController c)
 {
     charactersController = c;
 }