Ejemplo n.º 1
0
 /*
  * Function called when the character is no longer in a melee attck animation.
  * Hides the melee weapon and restores the firearm.
  * */
 public override void meleeAttackEnd()
 {
     melee        = false;
     currentMelee = 0;
     SRWeapon.SetActive(false);
     weaponHeld = true;
 }
Ejemplo n.º 2
0
 public override void meleeAttackEnd()
 {
     //Debug.Log ("MeleeEnd");
     melee        = false;
     currentMelee = 0;
     SRWeapon.SetActive(false);
     weaponHeld = true;
 }
Ejemplo n.º 3
0
 public override void meleeAttack()
 {
     //Debug.Log ("Melee");
     if (currentMelee == 0)                   //First melee attack in the combo
     {
         currentMelee++;
         melee      = true;
         weaponHeld = false;
         SRWeapon.SetActive(true);
         sounds.meleeSound();
     }
     else if ((currentMelee < meleeMax) && (anim.GetCurrentAnimatorStateInfo(1).IsName("Attack" + currentMelee)))                       //Post-first melee attacks, can only transition into state n+1 if we're in state n
     {
         currentMelee++;
         sounds.meleeSound();
     }
 }
Ejemplo n.º 4
0
    // Use this for initialization
    void Start()
    {
        base.Start();
        maxHealth = 160;
        health    = 160;

        weaponRange    = 500f;
        weaponFireRate = 0.2f;
        spreadRate     = 0.21f;
        maxSpread      = 12;
        gunDamage      = 16;

        //Melee
        meleeMax = 1;

        enemyType = "Gun";


        SRWeapon.SetActive(false);
    }
Ejemplo n.º 5
0
    // Use this for initialization
    void Start()
    {
        base.Start();
        maxHealth = 120;
        health    = 120;

        weaponRange    = 500f;
        weaponFireRate = 0.2f;
        spreadRate     = 0.21f;
        maxSpread      = 12;
        gunDamage      = 3;

        //Melee
        meleeMax      = 1;
        shootingRange = 2;
        stoppingRange = 1;

        enemyType = "Melee";

        SRWeapon.SetActive(false);
    }
Ejemplo n.º 6
0
 // Use this for initialization
 public void Start()
 {
     base.Start();
     SRWeapon.SetActive(false);          //Hide melee weapon and turnoff collision
     rotSpeed = defaultRotationSpeed;
 }
Ejemplo n.º 7
0
 // Use this for initialization
 void Start()
 {
     base.Start();
     SRWeapon.SetActive(false);
 }