source: 2013/30/DenisZ/CastleMaster/CastleMaster/CastleMaster/Ai/Orders/OrderGoAround.cs @ 4635

Revision 4635, 1.0 KB checked in by dezhidki, 6 years ago (diff)

Talletus.

Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using IsometricEngineTest.Ai.Orders;
6using CastleMaster.Entities;
7using CastleMaster.Units.Mobs;
8using CastleMaster.Graphics;
9
10namespace CastleMaster.Ai.Orders
11{
12    public class OrderGoAround : OrderMove
13    {
14        private Entity ent;
15        private int entityRadius;
16
17        public OrderGoAround(float x, float z, int entityRadius, Entity ent, float stopDistance = 2.0F, bool excludeEndSolidness = false, bool createNewPathFinder = true)
18            : base(x, z, stopDistance, excludeEndSolidness, createNewPathFinder)
19        {
20            this.entityRadius = entityRadius;
21            this.ent = ent;
22        }
23
24        public override Order Initialize(Mob mob)
25        {
26            base.Initialize(mob);
27            mob.PathFinder.ApplySolidnessToPos(mob.Level.GetEntitySolidnessList(ent, (int)(ent.X / Viewport.TILESIZE), (int)(ent.Z / Viewport.TILESIZE, entityRadius));
28            return this;
29        }
30    }
31}
Note: See TracBrowser for help on using the repository browser.