// Use this for initialization void Start() { soldierUnit = SoldierUnit.Instance; shooterUnit = ShooterUnit.Instance; wallUnit = WallUnit.Instance; bombUnit = BombUnit.Instance; playerBase = GameObject.FindGameObjectWithTag("PlayerBase"); if (soldierUnit != null) { SetSoldierParams(); } if (shooterUnit != null) { SetShooterParams(); } if (wallUnit != null) { SetWallParams(); } if (bombUnit != null) { SetBombUnitParams(); } if (playerBase != null) { playerBase.GetComponent <DefenceHealth>().maxHealth = health; } }
// Use this for initialization void Awake() { Instance = this; }