Aura.Channel.World.Entities.Entity.GetPosition C# (CSharp) 메소드

GetPosition() 공개 추상적인 메소드

Entity's current position
public abstract GetPosition ( ) : Position
리턴 Position
		public abstract Position GetPosition();

Usage Example

예제 #1
0
파일: Creature.cs 프로젝트: NegativeJ/aura
		/// <summary>
		/// Sets region, x, and y, to be near entity.
		/// Also randomizes direction.
		/// </summary>
		/// <param name="entity"></param>
		/// <param name="range"></param>
		public void SetLocationNear(Entity entity, int range)
		{
			var rnd = RandomProvider.Get();
			var pos = entity.GetPosition();
			var target = pos.GetRandomInRange(range, rnd);
			var dir = (byte)rnd.Next(256);

			this.SetLocation(entity.RegionId, target.X, target.Y);
			this.Direction = dir;
		}
All Usage Examples Of Aura.Channel.World.Entities.Entity::GetPosition