private void Awake()
 {
     if (s_instance != null)
     {
         Debug.Log("Warning: Seems like more than one instance of PlayerAiMovement is running!");
     }
     s_instance = this;
 }
Example #2
0
    public float[] GenerateInputData()
    {
        float[] inputData = null;

        if (m_controllerType == ControllerType.Player)
        {
            inputData = PlayerMovement.Instance().GenerateInputDataPlayer();
        }
        else if (m_controllerType == ControllerType.Ai)
        {
            inputData = PlayerAiMovement.Instance().GenerateInputData();
        }

        if (inputData.Length > 3 && !m_allowUpDownMovement)
        {
            inputData[2] = inputData[3] = 0;
        }

        return(inputData);
    }