Beispiel #1
0
        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));
        }
Beispiel #2
0
        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));
        }