Пример #1
0
 /// <summary>
 /// Initalizes the Sington Reference.
 /// </summary>
 private void Awake()
 {
     if (_Self)
     {
         Debug.LogError("Multiple Input Poller Classes Exist. This is a singleton object and only one should exist EVER.");
         return;
     }
     _Self = this;
 }
Пример #2
0
    protected virtual void GetInput()
    {
        if (!IP)
        {
            LOG_ERROR("****PLAYER CONTROLER (" + gameObject.name + "): No Input Poller in Scene");
            return;
        }

        IS = InputPoller.GetReference().GetPlayerInput(InputPlayerNumber);
        if (LogInputStateInfo)
        {
            LOG(IS.ToString());
        }
        ProcessInputState();
        ISprevious = IS;
    }
Пример #3
0
    protected override void Start()
    {
        base.Start();
        IsHuman = true;

        IP = InputPoller.Self;
        if (!IP)
        {
            LOG_ERROR("****PLAYER CONTROLER: No Input Poller in Scene");
            return;
        }
        AxisDelegates   = new Dictionary <string, InputAxis>();
        ButtonDelegates = new Dictionary <string, InputButton>();
        IS         = InputState.GetBlankState();
        ISprevious = InputState.GetBlankState();
        DefaultBinds();
    }
Пример #4
0
 void Awake()
 {
     Self = this;
 }