Aura.Channel.World.Entities.Creature.TurnTo C# (CSharp) Метод

TurnTo() публичный Метод

Turns creature in given direction.
public TurnTo ( float x, float y ) : void
x float
y float
Результат void
		public void TurnTo(float x, float y)
		{
			this.Direction = MabiMath.DirectionToByte(x, y);
			Send.TurnTo(this, x, y);
		}

Same methods

Creature::TurnTo ( Position pos ) : void

Usage Example

Пример #1
0
		/// <summary>
		/// Starts fishing at target location.
		/// </summary>
		/// <param name="creature"></param>
		/// <param name="skill"></param>
		/// <param name="packet"></param>
		public void Use(Creature creature, Skill skill, Packet packet)
		{
			var targetPositionId = packet.GetLong();
			var unkInt1 = packet.GetInt();
			var unkInt2 = packet.GetInt();

			var pos = new Position(targetPositionId);

			creature.Temp.FishingProp = new Prop(274, creature.RegionId, pos.X, pos.Y, 1, 1, 0, "empty");
			creature.Region.AddProp(creature.Temp.FishingProp);

			creature.TurnTo(pos);

			Send.Effect(creature, Effect.Fishing, (byte)FishingEffectType.Cast, true);
			Send.SkillUse(creature, skill.Info.Id, targetPositionId, unkInt1, unkInt2);

			this.StartFishing(creature, 1000);
		}