Exemplo n.º 1
0
        public Attack(AttackType tp, Vector frm, Vector t, int dmg, Creature crea, List <Vector> zone)
        {
            this.type   = tp;
            this.from   = frm;
            this.to     = t;
            this.damage = dmg;

            this.parent = crea;

            var dir = to;

            for (int i = 0; i < zone.Count; i++)
            {
                this.realPos.Add(this.RotateVector(zone[i], dir) + from + to);
            }

            AttacksContainer.Add(this);
            var timer = new Timer("attack", ticks, () => { AttacksContainer.Remove(this); });
        }