// Update is called once per frame void Update() { Dynamic cPlayerDynamic = m_objPlayer.GetComponent <Dynamic>(); cPlayerDynamic.SphereCollisionProcess(m_listMonsters); for (int i = 0; i < m_listMonsters.Count; i++) { NPCNavTarcking cNavTracking = m_listMonsters[i].GetComponent <NPCNavTarcking>(); Player cMonster = m_listMonsters[i].GetComponent <Player>(); cNavTracking.SphereCollisionProcess(m_objPlayer); if (cMonster.Dead()) { m_listMonsters[i].SetActive(false); m_listMonsters[i].transform.position = m_cDeadDumy.position; m_cResponManager.SetResponPoint(i, m_listMonsters[i]); m_queResponQueue.Enqueue(m_listMonsters[i].GetComponent <Player>()); StartCoroutine("MonsterRespron"); } } if (m_cGUIManager.m_objSelect.activeSelf == false) { if (User.Collision.ColSphere(m_cNPC.transform.position, 3, cPlayerDynamic.transform.position)) { m_cGUIManager.m_objSelect.SetActive(true); } } Player cPlayer = m_objPlayer.GetComponent <Player>(); m_cGUIManager.m_cHPStatus.SetHP(cPlayer.Status.m_nHP, cPlayer.MaxHP); Dynamic cDynamic = m_objPlayer.GetComponent <Dynamic>(); cDynamic.JoystickMove(m_cGUIManager.m_cJoystick.m_vecDir); if (Input.GetKeyDown(KeyCode.I)) { if (m_cGUIManager.m_cInventoryManager.gameObject.activeSelf == false) { m_cGUIManager.m_cInventoryManager.Set(cPlayer); m_cGUIManager.m_cInventoryManager.gameObject.SetActive(true); } else { m_cGUIManager.m_cInventoryManager.gameObject.SetActive(false); } } }
// Update is called once per frame void Update() { Dynamic cPlayerDynamic = m_objPlayer.GetComponent <Dynamic>(); Player cPlayer = m_objPlayer.GetComponent <Player>(); cPlayerDynamic.SphereCollisionProcess(m_listMonsters); for (int i = 0; i < m_listMonsters.Count; i++) { NPCNavTarcking cNavTracking = m_listMonsters[i].GetComponent <NPCNavTarcking>(); Player cMonster = m_listMonsters[i].GetComponent <Player>(); cNavTracking.SphereCollisionProcess(m_objPlayer); if (cMonster.Dead()) { m_listMonsters[i].SetActive(false); m_listMonsters[i].transform.position = m_cDeadDumy.position; } } }