Esempio n. 1
0
        protected override void SampleInputs()
        {
            var inputs = MatchConfig.CreateNativePlayerBuffer <PlayerInput>(Allocator.Temp);

            _reader.ReadInputs(new NativeSlice <PlayerInput>(inputs, 0, Config.PlayerCount));
            InjectInputs(inputs);
        }
Esempio n. 2
0
        protected virtual void SampleInputs()
        {
            var manager = InputManager.Instance;

            if (manager == null)
            {
                return;
            }
            var inputs = MatchConfig.CreateNativePlayerBuffer <PlayerInput>(Allocator.Temp);

            for (var i = 0; i < Config.PlayerCount; i++)
            {
                if (!Config[i].IsLocal)
                {
                    continue;
                }
                inputs[Config[i].PlayerID] = manager.GetInputForPlayer(Config[i].LocalPlayerID);
            }
            InjectInputs(inputs);
        }
Esempio n. 3
0
 protected override void OnCreate()
 {
     _data = MatchConfig.CreateNativePlayerBuffer <PlayerUIData>();
 }
 protected override void OnCreate()
 {
     _inputs = MatchConfig.CreateNativePlayerBuffer <PlayerInput>();
 }