}; // 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(); }
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)); }
// Get Instance to the AIBot public static AIBot getInstance() { if (AIBot.instance == null) { AIBot.instance = new AIBot(); } return(AIBot.instance); }
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>(); }
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); } }
public override void Execute(ActivityContext context) { var text = context.Get(this.Text); AIBot.TextToSpeech(text); }
public override void Execute(ActivityContext context) { var text = AIBot.SpeechToText(); context.Set(this.Text, text); }
public Idle(AIBot aiBot) { this.aiBot = aiBot; }
private static void Action_C(AIBot bot) { }
public static void DoAction(AIBot bot) { }
private void OnEnable() { Instance = this; IsGameOver = false; }
public Wander(AIBot aiBot) { this.aiBot = aiBot; }