/// <summary> /// Called whenever a hitbox hits a hurtbox successfully. /// </summary> /// <param name="hurtableHit">The hurtable that was hit.</param> /// <param name="hitInfo">The hitInfo of the hitbox.</param> /// <param name="hitboxID">The hitbox ID of the hitbox.</param> protected virtual void OnHitboxHurt(GameObject hurtableHit, HitInfoBase hitInfo, int hitboxID, int hitboxGroup) { hurtablesHit[hitboxID].Add(hurtableHit.GetComponent <IHurtable>()); combatManager.SetHitStop(hitInfo.attackerHitstop); UpdateHitboxIDIgnoreList(hitboxID); OnHitboxHit?.Invoke(hurtableHit, hitboxGroup, combatManager.CurrentAttack); }
/// <summary> /// Called whenever a hitbox hits a hurtbox successfully. /// </summary> /// <param name="hurtableHit">The hurtable that was hit.</param> /// <param name="hitInfo">The hitInfo of the hitbox.</param> /// <param name="hitboxID">The hitbox ID of the hitbox.</param> protected override void OnHitboxHurt(GameObject hurtableHit, HitInfoBase hitInfo, int hitboxID, int hitboxGroup) { SoundDefinition sd = ((EntityManager)combatManager.manager).GameManager.ModManager .GetSoundDefinition( ((Combat.BoxGroup)combatManager.CurrentAttack.attackDefinition.boxGroups[hitboxGroup]).hitSound?.reference); SoundManager.Play(sd, 0, manager.transform); ((EntityManager)manager).power += ((Combat.HitInfo)hitInfo).attackerPowerGainOnHit; base.OnHitboxHurt(hurtableHit, hitInfo, hitboxID, hitboxGroup); }
public HitInfoBase(HitInfoBase copy) { this.ID = copy.ID; }
private void DestroyBullet(GameObject hurtableHit, HitInfoBase hitInfo) { GameObject.Destroy(gameObject); }