Exemple #1
0
 private void AddShip(CastleShip.CastleShipType castleShipType, bool ai = false)
 {
     if (CastleShip != null)
     {
         RemoveShip();
     }
     castleShip = battleManagerRef.SpawnShip(castleShipType, this.BoundPlayerID, this.spawnPosition, ai);
     CastleShip.OnGoldChanged += AddGold;
     CastleShip.OnKill        += AddKill;
     CastleShip.SetColourMaterial(this.playerColour);
     playerUIManager.ConnectToCastleShip(CastleShip);
     CastleShip.DamageableRef.OnDeath.AddListener(OnShipDie);
 }