Beispiel #1
0
 public override void update()
 {
     if (Input.GetKeyDown(KeyCode.Escape))
     {
         this.belongTO.switchState("setting");
     }
     if (gameManager.IsPlayerDead())
     {
         this.belongTO.switchState("dead");
     }
     if (GameManagerData.GetInstance().IsStory)
     {
         this.belongTO.switchState("story");
     }
 }
        public void switchEquipment(IEquipment equipment)
        {
            if (equipment == null)
            {
                return;
            }

            ClearEquipment();

            IEquipment newEquipment = Instantiate(equipment, this.transform.position, this.transform.rotation, this.transform);

            curEquipment = newEquipment;
            curEquipment.setCharacter(main);

            if (this.name == "BackEquipment")
            {
                GameManagerData.GetInstance().WEDcurEquipmentBack = equipment;
            }
            if (this.name == "HandEquipment")
            {
                GameManagerData.GetInstance().WEDcurEquipmentHand = equipment;
            }
        }
Beispiel #3
0
 public void SwitchScene(int SceneIndex)
 {
     this.gameBoundNumber = -1;
     NextSceneNumber      = SceneIndex;
     GameManagerData.GetInstance().stateMachine.switchState("switchscenes");
 }
Beispiel #4
0
 public GameState_Playing(GameManager gm)
 {
     this.gameManager = gm;
     belongTO         = GameManagerData.GetInstance().stateMachine;
 }
Beispiel #5
0
 public override void onExit()
 {
     GameManagerData.GetInstance().IsStory = false;
 }
Beispiel #6
0
 public GameState_SwitchScenes(GameManager gm)
 {
     this.gameManager = gm;
     belongTO         = GameManagerData.GetInstance().stateMachine;
 }