예제 #1
0
    public void loadResources()
    {
        LeftCoast  = new Coast(-1);
        RightCoast = new Coast(1);
        boat       = new Boat();
        water      = new Water();
        for (int i = 0; i < 3; i++)
        {
            Debug.Log("ok");
            Character newCharacter = new Character(0);
            newCharacter.setName("priest" + i);
            newCharacter.setPosition(RightCoast.getEmptyPosition());
            newCharacter.getOnCoast(RightCoast);
            RightCoast.getOnCoast(newCharacter);

            characters[i] = newCharacter;
        }
        for (int i = 0; i < 3; i++)
        {
            Character newCharacter = new Character(1);
            newCharacter.setName("devil" + i);
            newCharacter.setPosition(RightCoast.getEmptyPosition());
            newCharacter.getOnCoast(RightCoast);
            RightCoast.getOnCoast(newCharacter);

            characters[i + 3] = newCharacter;
        }
    }
예제 #2
0
 public void reset()
 {
     Cmove.reset();
     coast = (Director.getInstance().currentSceneController as main).RightCoast;
     getOnCoast(coast);
     setPosition(coast.getEmptyPosition());
     coast.getOnCoast(this);
 }
예제 #3
0
 private void loadCharacter()
 {
     for (int i = 0; i < 3; i++)
     {
         Character character = new Character("Priest");
         character.setName("priest" + i);
         character.setPosition(fromCoast.getEmptyPosition());
         character.getOnCoast(fromCoast);
         fromCoast.getOnCoast(character);
         characters[i] = character;
     }
     for (int i = 0; i < 3; i++)
     {
         Character character = new Character("Devil");
         character.setName("devil" + i);
         character.setPosition(fromCoast.getEmptyPosition());
         character.getOnCoast(fromCoast);
         fromCoast.getOnCoast(character);
         characters[i + 3] = character;
     }
 }