public override CommandStub GenerateCommand(GameQuery_Command commandQuery) { Entity target = commandQuery.ArenaState.Player; var targetPos = target.TryGetPosition(); if (this.lastPath == null || !this.EnemyOnPath(targetPos)) { this.lastPath = Action_MoveTowardsEnemy.GeneratePath(commandQuery, targetPos); } return(this.MoveEventForPath(commandQuery, this.lastPath)); }
public override CommandStub GenerateCommand(GameQuery_Command commandQuery) { Entity target = commandQuery.FloorState.Player; var targetPos = target.TryGetPosition(); // TODO: Lol wtf if (commandQuery.CommandEntity.TryGetPosition().Z != targetPos.Z) { return(new CommandStub_Delay(commandQuery.CommandEntity.EntityID, Config.ONE)); } if (this.lastPath == null || !this.EnemyOnPath(targetPos)) { this.lastPath = Action_MoveTowardsEnemy.GeneratePath(commandQuery, targetPos); } return(this.MoveEventForPath(commandQuery, this.lastPath)); }