public void SendCapitalShipDeathMessage( CapitalShipMaster _capitalShip ) { if ( this.gameState == GAME_STATE.CAPITAL_DESTRUCTION || this.gameState == GAME_STATE.POST_GAME ) { //TODO: Capital ship has already died, now another one has, hm return; } else if ( Network.peerType != NetworkPeerType.Disconnected ) { this.GetComponent<NetworkView>().RPC( "OnCapitalShipDeathRPC", RPCMode.Others, _capitalShip.health.Owner.id ); } this.OnCapitalShipDeathRPC( _capitalShip.health.Owner.id ); }
public void SendCapitalShipExplodedMessage( CapitalShipMaster _capitalShip ) { if ( Network.peerType != NetworkPeerType.Disconnected ) { this.GetComponent<NetworkView>().RPC( "OnCapitalShipExplodedRPC", RPCMode.Others ); } this.OnCapitalShipExplodedRPC(); }
private void OwnerInitialise() { this.ownerInitialised = true; int id = this.ownerControl.ownerID.Value; this.health.Owner = GamePlayerManager.instance.GetPlayerWithID( id ); this.health.Owner.fighter = this; DebugConsole.Log( "Set player " + id + " to own fighter", this.gameObject ); if ( this.GetComponent<NetworkView>().isMine == false && Network.peerType != NetworkPeerType.Disconnected ) { this.enabled = false; this.movement.enabled = false; this.GetComponent<Rigidbody>().constraints = RigidbodyConstraints.FreezeAll; } this.weapons.restrictions.teams = (int)Common.OpposingTeam( this.health.Owner.team ); this.capitalShip = GamePlayerManager.instance.GetCapitalShip( this.health.Owner.team ); this.SetTeamColours(); }