Beispiel #1
0
    }; // List for possible mill position

    // Initiate function when game started
    void Awake()
    {
        // Constructions
        currentTurn  = 'W';
        tokenCounter = 0;
        phase        = 1;
        operataion   = "none";

        PlayerTokenList = new ArrayList(9);
        AITokenList     = new ArrayList(9);
        boardStatus     = new char[spotList.Length];
        tokenObjList    = new GameObject[spotList.Length];

        AI = AIBot.getInstance();
        AI.SetGameControllerReferences(this);

        stateControl = GameObject.FindGameObjectWithTag("state").GetComponent <GameStateController>();

        if (stateControl.GetCurrentEvent() == "Monster")
        {
            MonsterCombat.SetActive(true);
        }
        else if (stateControl.GetCurrentEvent() == "Boss")
        {
            BossCombat.SetActive(true);
        }

        for (int i = 0; i < spotList.Length; i++)
        {
            spotList[i].GetComponent <Spot>().SetGameControllerReferences(this);
            boardStatus[i] = 'N';
        }

        StartGame();
    }
Beispiel #2
0
        public override void Execute(ActivityContext context)
        {
            var x = context.Get(this.X, 0);
            var y = context.Get(this.Y, 0);
            var w = context.Get(this.Width, 0);
            var h = context.Get(this.Height, 0);

            context.Set(this.Text, AIBot.ScreenToText(x, y, w, h));
        }
Beispiel #3
0
    // Get Instance to the AIBot
    public static AIBot getInstance()
    {
        if (AIBot.instance == null)
        {
            AIBot.instance = new AIBot();
        }

        return(AIBot.instance);
    }
Beispiel #4
0
 void Start()
 {
     if (instance == null)
     {
         instance = this;
     }
     ControllJump(false, false);
     isMove          = false;
     isStart         = true;
     NumberGun       = 0;
     _rigidbody2DBot = GetComponent <Rigidbody2D>();
     SpriteRenderer  = GetComponent <SpriteRenderer>();
     PositionBot     = GetComponent <Transform>();
 }
Beispiel #5
0
 private static void Main()
 {
     Console.OutputEncoding = Console.InputEncoding = Encoding.UTF8;
     try
     {
         var bot = new AIBot("", "memory.txt", "triggers.txt", i => Console.WriteLine(i));
         Console.Title = $"@{bot.Name}";
         Console.WriteLine($"{Console.Title} is working now.\nPress any key to stop.\n");
         Console.ReadKey();
     }
     catch (Exception e)
     {
         Console.WriteLine(e.Message);
     }
 }
Beispiel #6
0
        public override void Execute(ActivityContext context)
        {
            var text = context.Get(this.Text);

            AIBot.TextToSpeech(text);
        }
Beispiel #7
0
        public override void Execute(ActivityContext context)
        {
            var text = AIBot.SpeechToText();

            context.Set(this.Text, text);
        }
 public Idle(AIBot aiBot)
 {
     this.aiBot = aiBot;
 }
Beispiel #9
0
 private static void Action_C(AIBot bot)
 {
 }
Beispiel #10
0
 public static void DoAction(AIBot bot)
 {
 }
Beispiel #11
0
 private void OnEnable()
 {
     Instance   = this;
     IsGameOver = false;
 }
Beispiel #12
0
 private static void Action_C(AIBot bot)
 {
 }
Beispiel #13
0
 public static void DoAction(AIBot bot)
 {
 }
 public Wander(AIBot aiBot)
 {
     this.aiBot = aiBot;
 }