コード例 #1
0
        private void Awake()
        {
            inputInterface = player.GetComponent <Player.PlayerCharacter>();
            if (inputInterface == null)
            {
                Debug.LogError("Input interface not found");
            }


            QMat = DataStore.Load("QMat");

            if (QMat == null)
            {
                Debug.LogWarning("Coudln't load QMat!");
                QMat = new float[10, 2, 5, countMoves, 3];
            }

            // initialize random seed
            Random.InitState((int)System.DateTime.Now.TimeOfDay.Ticks);

            if (keyboard != null)
            {
                keyboard.SetInputInterface(inputInterface);
                keyboard.SetAction(Moves.Nothing);
            }
            else
            {
                Debug.LogError("Ai keyboard not found!");
            }

            //temps
            qvalues = new float[countMoves];
        }
コード例 #2
0
ファイル: AIKeyboard.cs プロジェクト: fshahinfar1/Runner
 public void SetInputInterface(Player.CharacterInput input)
 {
     inputInterface = input;
 }