///////////////////// ////// METHODS ////// ///////////////////// /// <summary> /// Return a unit initialised with the behavior and agent /// </summary> /// <param name="agent">agent to include in the unit</param> /// <returns>Return a unit if success and null otherwise</returns> public Editeur.Unit GetUnit(GameObject agent) { if (BotTypes.WarType(agent.GetComponent <WarBotController>().Type) != this.unit_name) { return(null); } return(new Editeur.Unit(agent, this.instr_list)); }
/// <summary> /// Return the name of the unit /// </summary> /// <returns>Return the name of the unit</returns> protected string GetUnitName() { return(BotTypes.WarType(this.GetComponent <WarBotController>().Type)); }