/* * 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; }
public override void meleeAttackEnd() { //Debug.Log ("MeleeEnd"); melee = false; currentMelee = 0; SRWeapon.SetActive(false); weaponHeld = true; }
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(); } }
// 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); }
// 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); }
// Use this for initialization public void Start() { base.Start(); SRWeapon.SetActive(false); //Hide melee weapon and turnoff collision rotSpeed = defaultRotationSpeed; }
// Use this for initialization void Start() { base.Start(); SRWeapon.SetActive(false); }