예제 #1
0
        public void SendFire(InputFire fire)
        {
            var net            = this.world.GetModule <NetworkModule>();
            var playersFeature = this.world.GetFeature <PlayersFeature>();

            net.RPC(this, this.fireRpcId, playersFeature.GetActivePlayerId(), fire);
        }
예제 #2
0
        private void Fire_RPC(int actorId, InputFire fire)
        {
            var playersFeature = this.world.GetFeature <PlayersFeature>();
            var playerEntity   = playersFeature.GetEntityByActorId(actorId);

            playerEntity.SetData(new Example.Features.PlayerFire.Components.FireAction()
            {
            }, ComponentLifetime.NotifyAllSystems);
        }