void Start() { PlayerOM = GameObject.FindGameObjectWithTag("PlayerObjectManager").GetComponent <PlayerObjectManager>(); explode.Stop(); fire.Stop(); shot = (GameObject)Resources.Load("Prefabs/Sphere"); missile = (GameObject)Resources.Load("Prefabs/missile"); PUnit = GameObject.FindGameObjectWithTag("PlayerUnit"); Targetting = transform.Find("Targetting").gameObject; }
void Start() { GameObject[] obj = GameObject.FindGameObjectsWithTag("GameStateManager"); if (obj.Length > 1) { //既に存在してるなら削除 Destroy(gameObject); } else { //管理マネージャーはシーン遷移では破棄させない DontDestroyOnLoad(gameObject); } PlayerOM = GameObject.FindGameObjectWithTag("PlayerObjectManager").GetComponent <PlayerObjectManager>(); GameStateManagerInit(); GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerManager>().PlayerInit(); }
private void InitTest() { PMO = GameObject.Find("ObjectManager").gameObject.GetComponent <PlayerObjectManager>(); PMO.CreatePlayerUnit(); PSC = GameObject.FindGameObjectWithTag("PlayerUnit").GetComponent <PlayerStatusController>(); }