public static CHumanState_Dead Instance() { if (instance == null) { instance = new CHumanState_Dead(); } return(instance); }
void SetState() { switch (m_synclocalHumanState) { case (int)StateID.BIKURI: m_human.PStateMachine.ChangeState(CHumanState_Bikuri.Instance()); break; case (int)StateID.CARRY: m_human.PStateMachine.ChangeState(CHumanState_Carry_Motion.Instance()); break; case (int)StateID.DASH: m_human.PStateMachine.ChangeState(CHumanState_Dash_Motion.Instance()); break; case (int)StateID.DEAD: m_human.PStateMachine.ChangeState(CHumanState_Dead.Instance()); break; case (int)StateID.GET: m_human.PStateMachine.ChangeState(CHumanState_Get.Instance()); break; case (int)StateID.ITEM: m_human.PStateMachine.ChangeState(CHumanState_Item.Instance()); break; case (int)StateID.MAIN: m_human.PStateMachine.ChangeState(CHumanState_Main.Instance()); break; case (int)StateID.MOVE: m_human.PStateMachine.ChangeState(CHumanState_Move_Motion.Instance()); break; case (int)StateID.SET: m_human.PStateMachine.ChangeState(CHumanState_Set.Instance()); break; case (int)StateID.USE: m_human.PStateMachine.ChangeState(CHumanState_Use.Instance()); break; } switch (m_syncGlobalHumanState) { case (int)StateID.PANIK: m_human.PStateMachine.SetGlobalStateState(CHumanState_Perception.Instance()); break; case (int)StateID.WAIT: m_human.PStateMachine.SetGlobalStateState(CHumanState_Wait.Instance()); break; } }
void Update() { if (m_dummyGhost == null || m_dummyGhost.Length < 3) { m_dummyGhost = GameObject.FindGameObjectsWithTag("DummyGhost");//優先 } if (m_ghost == null) { m_ghost = GameObject.Find("Ghost(Clone)");//優先 if (m_ghost == null) { m_ghost = GameObject.Find("Ghost"); } } if (m_find == null) { foreach (Transform child in this.transform) { if (child.name == "find") { m_find = child.gameObject; } } } if (m_candy == null) { foreach (Transform child in this.transform) { if (child.name == "Candy") { m_candy = child.gameObject; } } } if (m_animator == null) { m_animator = this.GetComponent <Animator>(); } if (ExMark == null || Impatiencle == null || Chikin == null) { foreach (Transform child in this.transform) { if (child.name == "ExclamationMark") { ExMark = child.GetComponent <ParticleSystem>(); } if (child.name == "ImpatienceParticle") { Impatiencle = child.GetComponent <ParticleSystem>(); } if (child.name == "StanChickParticle") { Chikin = child.GetComponent <ParticleSystem>(); Chikin.gameObject.SetActive(false); } } } if (Doa()) { m_pStateMachine.ChangeState(CHumanState_Dead.Instance()); } if (HunmanStrength <= 0) { if (!Impatiencle.isPlaying) { Impatiencle.Play(); } } else { // Impatiencle.Stop(); // Impatience.Clear(); } }