/* * //public void OnCollisionEnter(Collision c) * public void OnControllerColliderHit(ControllerColliderHit c) * //public void OnTriggerEnter(Collider c) * { * // push back enemies if you run into them while blocking * if(this.status.blocking)// && c.gameObject.CompareTag("EnemyMob")) * { * Debug.Log("bash : " + c.gameObject.tag); * // counter test * var otherDude = c.gameObject.GetComponent(typeof(Dude)) as Dude; * if(otherDude != null) * { * var knockbackForce = 10;//mainWeapon.swingKnockback[0]; * var forceVec = (otherDude.transform.position - transform.position).normalized; * otherDude.AddForce(forceVec * knockbackForce); * } * } * } */ public void OnFollowUp() { var currentFacing = transform.forward; if (controller != null) { currentFacing = controller.GetCurrentMoveVec(); } if (followUpQueued && !disabled && !status.stunned) { dude.Look(currentFacing); /* * var attackChain = mainWeapon.GetComponent<MeleeAttackChain>(); * if(false)//attackChain != null) * { * attackChain.charge = 1.0f; * attackChain.OnChargeAttack(); * } * else * { * OnAttack(); * } */ OnAttack(); if (!alwaysFollowUp) { followUpQueued = false; } } }