Esempio n. 1
0
    public void loadResources()
    {
        GameObject river = Instantiate(Resources.Load("prefabs/river", typeof(GameObject)), riverPos, Quaternion.identity, null) as GameObject;

        river.name = "river";
        startLand  = new LandController("from");
        endLand    = new LandController("to");
        boat       = new BoatController();

        for (int i = 0; i < 3; i++)
        {
            chCtrl.CharacterController _ch = new chCtrl.CharacterController("priest");
            _ch.setName("priest[" + i + "]");
            _ch.setPosition(startLand.getEmptyPlace());
            _ch.getOnLand(startLand);
            startLand.addObj(_ch);
            ch[i] = _ch;
        }
        for (int i = 0; i < 3; i++)
        {
            chCtrl.CharacterController _ch = new chCtrl.CharacterController("devil");
            _ch.setName("devil[" + i + "]");
            _ch.setPosition(startLand.getEmptyPlace());
            _ch.getOnLand(startLand);
            startLand.addObj(_ch);
            ch[i + 3] = _ch;
        }
    }
Esempio n. 2
0
 public void reset()
 {
     move.reset();
     landController = (SSDirector.getInstance().currentSceneController as FirstController).startLand;
     getOnLand(landController);
     setPosition(landController.getEmptyPlace());
     landController.addObj(this);
 }