public Ammo(ObjectID obId, Position from, Position to, AmmoType ammoType, short speed, short damage, short damageRange, Simulation sim) : base(obId, Yad.Config.BoardObjectClass.Ammo, from) { this.ammoType = ammoType; this.damage = damage; this.damageRange = damageRange; this.sim = sim; this.speed = speed; this.Position = this.lastPosition = from; path = BoardObject.Bresenham(ref from, ref to); // jest na odwrot this.from = from; this.to = to; int dir = GetAlfa((int)to.X - (int)from.X, (int)to.Y - (int)from.Y); direction = ConvertToNearestDirection(dir); }