private void OnEntityLost(MEntity entity, bool wasNatural) { if (entity.IsPlayer()) { var player = (FFAPlayerBehaviour)entity.GetBehaviour(typeof(FFAPlayerBehaviour).FullName); AllPlayers.Remove(player); } }
private void OnEntityReceived(MEntity entity, bool wasNatural) { if (entity.IsPlayer()) { // A player entity has been received! // Register behaviour to control transformation in to props! var player = (FFAPlayerBehaviour)entity.RegisterBehaviour(parent, typeof(FFAPlayerBehaviour).FullName); // player.parent.SetServerTeam(FFATeam); AllPlayers.Add(player); } }