Exemple #1
0
 protected void Awake()
 {
     if (Instance != null && Instance != this)
     {
         Destroy(gameObject);
     }
     else
     {
         Instance = this;
     }
 }
Exemple #2
0
 protected void Start()
 {
     _mapPlatform           = MapPlatformGameObject.GetComponent <MapPlatform>();
     _pathGroupTeam1        = PathGroupTeam1.GetComponent <PathGroup>();
     _pathGroupTeam2        = PathGroupTeam2.GetComponent <PathGroup>();
     _currentShadowTiles2X2 = new List <GameObject>();
     if (Debugger)
     {
         _myDebugger = Debugger.GetComponent <MyDebugger>();
     }
     Instance = this;
 }
        protected bool TurretSpawn(int turretNumber, int playerNumber, int teamGroup, Vector3 location)
        {
            if (!_turretManager)
            {
                _turretManager = TurretManager.Instance;
                Debug.LogWarning("TurretManager is not found for this scene!");
                return(false);
            }

            var turretSpawned = _turretManager.PlaceTurret(turretNumber, playerNumber, teamGroup, location);

            return(turretSpawned);
        }
        protected bool TurretRemove(int teamGroup, int playerNumber, Vector3 location)
        {
            if (!_turretManager)
            {
                _turretManager = TurretManager.Instance;
                Debug.LogWarning("TurretManager is not found for this scene!");
                return(false);
            }

            var turretRemoved = _turretManager.RemoveTurret(playerNumber.ToString(), teamGroup, location);

            return(turretRemoved);
        }
 protected void Start()
 {
     _turretManager = TurretManager.Instance;
 }