// Use this for initialization void Start() { STGEngine = GetComponent <STGFramework>(); AIFrames = GetComponent <AIFramework>(); aAudioSource = GetComponent <AudioSource>(); this.gameObject.name = "Boss"; }
// Use this for initialization void Start() { STGEngine = GetComponent <STGFramework>(); AIFrames = GetComponent <AIFramework>(); aAudioSource = GetComponent <AudioSource>(); this.transform.rotation = Quaternion.Euler(180, 0, 0); }
/// <summary> /// See if the given player can attack the given base. /// </summary> /// <param name="b"></param> /// <param name="player"></param> /// <returns></returns> public bool IsBaseAttackable(Base b, AIFramework.Bot.Game.Player player) { if (b.Team != player.Team) { bool inContention = false; int id = b.BaseID; if (player.Team == GameSession.Alliance.RED && id == blueAttackableBaseID) inContention = true; else if (player.Team == GameSession.Alliance.BLUE && id == redAttackableBaseID) inContention = true; return inContention; } return false; }
/// <summary> /// Get the next attackable base for the given player. /// </summary> /// <param name="forPlayer"></param> /// <returns></returns> public Base GetAttackableBase(AIFramework.Bot.Game.Player forPlayer) { try { if (forPlayer.Team == GameSession.Alliance.RED) return bases[blueAttackableBaseID]; return bases[redAttackableBaseID]; } catch (KeyNotFoundException) { return null; } }
public CaptureTheBaseMode(AIFramework.Bot.Game.Map currentMap) : base(currentMap, GameMode.CAPTURETHEBASE) { bases = new Dictionary<int, Base>(); GenerateBases(); Console.WriteLine("[DEBUG] Capture the base mode initialized."); }
/// <summary> /// Constructs an IEvent class. /// </summary> /// <param name="_game"></param> public IEvent(AIFramework.Bot.VTankBot _game) { game = _game; }
// Use this for initialization void Start() { STGEngine = GetComponent <STGFramework>(); AIFrames = GetComponent <AIFramework>(); aAudioSource = GetComponent <AudioSource>(); }
/// <summary> /// Event called by the bot runner when a bot's state changes. /// </summary> /// <param name="bot"></param> /// <param name="newState"></param> private void BotRunner_OnBotStateChange(VTankBot bot, AIFramework.Runner.BotRunner.BotRunnerState newState) { if (newState != BotRunner.BotRunnerState.SelectingTank && OnBotChange != null) { buffer.Enqueue(new Invocation.InvocationTarget((o) => { OnBotChange((VTankBot)o); }), bot); NeedsBalance = true; } buffer.Enqueue(new Invocation((o) => { Print("{0}'s state: {1}", bot.AuthInfo.Username, newState.ToString()); })); }
// Use this for initialization void Start() { STGEngine = GetComponent <STGFramework>(); AIFrames = GetComponent <AIFramework>(); }