Exemple #1
0
 private void ExecuteEvent(PlayerMovementEvent playerMovementEvent)
 {
     eventEmitter.EmitPlayerMovedEvent(
         playerObjects[playerMovementEvent.Profile],
         playerMovementEvent.Position
         );
 }
Exemple #2
0
    // Update is called once per fram
    void Update()
    {
        if (!isLocalPlayer)
        {
            return;
        }

        Vector3?position = ExtractPosition();

        if (position == null)
        {
            return;
        }

        _eventEmitter.EmitPlayerMovedEvent(this.gameObject, position.Value);
    }