Esempio n. 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();
    }
Esempio n. 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));
        }
Esempio n. 3
0
    // Get Instance to the AIBot
    public static AIBot getInstance()
    {
        if (AIBot.instance == null)
        {
            AIBot.instance = new AIBot();
        }

        return(AIBot.instance);
    }
Esempio n. 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>();
 }
Esempio n. 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);
     }
 }
Esempio n. 6
0
        public override void Execute(ActivityContext context)
        {
            var text = context.Get(this.Text);

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

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