void Awake() { mpItemSpawn = FindObjectOfType <Class_ItemSpawn>(); mpEnemySpawn = FindObjectOfType <Class_EnemyJon>(); mpPlayScene = FindObjectOfType <Class_PlayScene>(); mpWizard = this.GetComponentInChildren <Class_Wizard>(); mpWarrior = this.GetComponentInChildren <Class_Warrior>(); mpReceiveWizard = this.GetComponentInChildren <Class_ReceiveWizard>(); mpReceiveWarrior = this.GetComponentInChildren <Class_ReceiveWarrior>(); mpPlayerUI = this.GetComponentInChildren <Class_PlayerUI>(); mpReceivePlayerUI = this.GetComponentInChildren <Class_ReceivePlayerUI>(); Destroy(mpReceivePlayerUI); if (Class_NetworkClient.GetInst().mMyUserInfo.mOccupation == "Warrior") { Destroy(mpWizard.gameObject); Destroy(mpReceiveWarrior); } else { Destroy(mpWarrior.gameObject); Destroy(mpReceiveWizard); } }
// Start is called before the first frame update void Start() { mpPlayer = FindObjectOfType <Class_Player>(); mpPlayScene = FindObjectOfType <Class_PlayScene>(); mpReceivePlayer = FindObjectOfType <Class_ReceivePlayer>(); }