public AttackShootAction(Vector2 dir, float dmg, int ticksLasts, WarriorController whoDeals) { warr = whoDeals; ticksToFinish = ticksLasts; direction = dir; damage = dmg; }
public AttackMeleeAction(Vector2 dealDamageAt, float dmg, int ticksLasts, WarriorController whoDeals) { attackingWarr = whoDeals; ticksToFinish = ticksLasts; this.dealDamageAt = dealDamageAt; damage = dmg; }
public MoveAction(float spd, float rotateBy, WarriorController w) { speed = spd; this.rotateBy = rotateBy; moves = w; ticksToFinish = 1; }
/// <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; }
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; }
public Limb Copy(WarriorController warrior) { return new Limb(name, hp, armorPercent, isVital, warrior); }