private void Awake() { if (instance == null) { instance = this; } else { Destroy(gameObject); } }
// Start is called before the first frame update void Start() { Ctx = this; MinionsManager = GetComponent <MinionsManager>(); GoldManager = GetComponent <GoldManager>(); TextManager = new TextManager(); // setup camera follow system _cameraFollow = GameObject.FindWithTag("MainCamera").GetComponent <CameraFollow>(); _cameraFollow.Setup(() => _cameraFollowPosition); InitializeCastleStatus(); }