public virtual void PerformAction(CommandSystem commandSystem) { var wander = new Wander(); var moveAndAttack = new MoveAndAttack(); Map world = game.MapManager.Map; Player player = game.Player; FieldOfView fov = new FieldOfView(world); wander.Act(this, commandSystem, game); // fov.ComputeFov(this.X, this.Y, this.Awareness, true); // if (fov.IsInFov(player.X, player.Y)) { // moveAndAttack.Act(this, commandSystem, game); // } else { // wander.Act(this, commandSystem, game); // } }
// Use this for initialization protected virtual void Awake() { _maa = minion.GetComponent <MoveAndAttack>(); enemy = null; }
public virtual void PerformAction(CommandSystem commandSystem) { var behavior = new MoveAndAttack(); behavior.Act(this, commandSystem); }