protected override void initializeComponents()
 {
     base.initializeComponents();
     user       = GetComponent <Character>();
     attacks    = new Attack[10];
     attacks[0] = new BasicSideAttack(user, dmg, 6, false, SoundManager.instance.audioclips["swordSFX"]);
     attacks[1] = new BasicUpAttack(user, dmg - 1, 5, false, SoundManager.instance.audioclips["swordSFX"]);
     attacks[2] = new BasicMovingAttack(user, dmg, 10);
     attacks[3] = new BasicSideAttack(user, dmg, 8, true, SoundManager.instance.audioclips["swordSFX"]);
     attacks[4] = new BasicUpAttack(user, dmg - 1, 8, true, SoundManager.instance.audioclips["swordSFX"]);
     attacks[5] = new BasicDownAttack(user, dmg - 1, 9, SoundManager.instance.audioclips["swordSFX"]);
     attacks[6] = new TemplarSpecialSide(user, effects[0]);
     attacks[7] = new TemplarSpecialUp(user, effects[1]);
     attacks[8] = new TemplarSpecialDown(user, effects[2]);
     attacks[9] = new TemplarFinal(user);
 }
Ejemplo n.º 2
0
 public void Start()
 {
     anim             = GetComponent <Animator>();
     sprite           = GetComponent <SpriteRenderer>();
     speed            = 30f;
     goingUp          = false;
     blackTemplar     = GetComponentInParent <Character>();
     shadowAttacks    = new Attack[8];
     shadowAttacks[0] = new BasicSideAttack(blackTemplar, BlackTemplarAttacks.dmg + 1, 6, false);
     shadowAttacks[1] = new BasicUpAttack(blackTemplar, BlackTemplarAttacks.dmg, 5, false);
     shadowAttacks[2] = new BasicMovingAttack(blackTemplar, BlackTemplarAttacks.dmg, 10);
     shadowAttacks[3] = new BasicSideAttack(blackTemplar, BlackTemplarAttacks.dmg + 1, 8, true);
     shadowAttacks[4] = new BasicUpAttack(blackTemplar, BlackTemplarAttacks.dmg, 8, true);
     shadowAttacks[5] = new BasicDownAttack(blackTemplar, BlackTemplarAttacks.dmg, 9);
     shadowAttacks[6] = new BasicSideAttack(blackTemplar, BlackTemplarAttacks.dmg + 3, 9, true);
     shadowAttacks[7] = new BasicUpAttack(blackTemplar, BlackTemplarAttacks.dmg * 2 + 1, 9, true);
     Physics2D.IgnoreCollision(blackTemplar.transform.GetChild(2).GetComponent <Collider2D>(), GetComponent <Collider2D>());
     if (GameManager.Instance.currentFight is TeamFight)
     {
         Entity teammate = ((TeamFight)GameManager.Instance.currentFight).getTeammate(blackTemplar.player);
         Physics2D.IgnoreCollision(teammate.transform.GetChild(2).GetComponent <Collider2D>(), GetComponent <Collider2D>());
     }
     hurtbox = transform.GetChild(0).GetComponent <Collider2D>();
 }