Example #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);
 }
Example #2
0
 // Start is called before the first frame update
 void Start()
 {
     castleShip.SetColourMaterial(this.playerColour);
 }