Exemplo n.º 1
0
 public void RegisterControllableEntity(PlayerControllableEntity entity)
 {
     if (entity != null)
     {
         controlledEntities[entity.networkEntity.entityID] = entity;
     }
 }
Exemplo n.º 2
0
 public void UnregisterControllableEntity(PlayerControllableEntity entity)
 {
     if (entity != null)
     {
         controlledEntities.Remove(entity.networkEntity.entityID);
     }
 }
        private void Awake()
        {
            speed         = initialSpeed;
            networkEntity = GetComponent <ServerNetworkEntity>();
            controller    = GetComponent <PlayerControllableEntity>();


            networkEntity.OnEnteredRoom += RegisterListeners;
            networkEntity.OnLeftRoom    += RemoveListeners;
        }