Exemplo n.º 1
0
 private void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     else
     {
         Destroy(gameObject);
     }
 }
Exemplo n.º 2
0
    // 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();
    }