Пример #1
0
            public AttackShootAction(Vector2 dir, float dmg, int ticksLasts, WarriorController whoDeals)
            {
                warr = whoDeals;

                ticksToFinish = ticksLasts;
                direction     = dir;
                damage        = dmg;
            }
Пример #2
0
            public AttackMeleeAction(Vector2 dealDamageAt, float dmg, int ticksLasts, WarriorController whoDeals)
            {
                attackingWarr = whoDeals;

                ticksToFinish     = ticksLasts;
                this.dealDamageAt = dealDamageAt;
                damage            = dmg;
            }
Пример #3
0
            public MoveAction(float spd, float rotateBy, WarriorController w)
            {
                speed         = spd;
                this.rotateBy = rotateBy;
                moves         = w;

                ticksToFinish = 1;
            }
Пример #4
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="name"></param>
 /// <param name="hp"></param>
 /// <param name="armor">percent of damage reflected</param>
 /// <param name="isVital"></param>
 /// <param name="wa"></param>
 public Limb(string name, float hp, float armor, bool isVital, WarriorController wa = null)
 {
     warrior = wa;
     this.name = name;
     this.hp = hp;
     armorPercent = armor;
     this.isVital = isVital;
 }
Пример #5
0
        public void Initialize(Vector2 start, Vector2 direction, float damage, WarriorController shooter)
        {
            body          = GetComponent <Rigidbody2D>();
            body.position = start;

            body.AddRelativeForce(direction * HelperConstants.projectileAccel, ForceMode2D.Impulse);

            this.damage    = damage;
            this.whoShoots = shooter;
        }
Пример #6
0
 public Limb Copy(WarriorController warrior)
 {
     return new Limb(name, hp, armorPercent, isVital, warrior);
 }