void Start() { if (summoner == null) { summoner = GameObject.FindObjectOfType<Summoner>(); } if (player == null) { player = GameObject.FindObjectOfType<PhysicsPlayerControl>(); } }
public void StartMetaGame() { enabled = true; ZoomOut ZoomComponent = Camera.main.GetComponent<ZoomOut>(); if(ZoomComponent != null) { ZoomComponent.Restart(); ZoomComponent.enabled = true; } SetBoundariesEnabled(false); Demon = FindObjectsOfType<PhysicsPlayerControl>().Where(Controller => Controller.GetComponent<DemonSmash>() != null).First(); Wizard.gameObject.active = false; Demon.gameObject.active = true; }