public Ability(Hero caster, byte abilityID, float lifeTimer, float xPos, float zPos, float yRot, float wRot) { this.caster = caster; this.lifeTimer = lifeTimer; ushort objID = ObjIDGenerator.GenerateID(ObjIDGenerator.ObjType.Ability); init = null; sync = new AbilitySyncData(objID, abilityID, caster.GetObjID(), caster.GetFaction(), xPos, zPos, yRot, wRot, 0, new EnemyVision(false)); }
public override void Update(float delta) { base.Update(delta); AbilitySyncData absync = (AbilitySyncData)sync; float newXPos = absync.xPos + xDir * speed * delta; float newZPos = absync.zPos + zDir * speed * delta; absync.SetPosition(newXPos, newZPos); if (ObjectManager.ApplyFireball(this)) { lifeTimer = 0; } }