コード例 #1
0
ファイル: MeleeAttack.cs プロジェクト: symbol24/ProjectJuice
 protected virtual void OnMeleeConsumed(ConsumingObjectEventArgs e)
 {
     try
     {
         if (MeleeConsumed != null)
         {
             MeleeConsumed(this, e);
         }
     }
     catch (Exception ex) { ex.Log(); throw; }
 }
コード例 #2
0
    private void _componentToListen_MeleeConsumed(object sender, ConsumingObjectEventArgs e)
    {
        var meleeScript = sender as MeleeAttack;
        var checkPlayer = e.AttemptingToConsume as HPScript;

        if (checkPlayer != null)
        {
            if (meleeScript.isAbility)
            {
                if (_enableAxeHitPlayerVibration)
                {
                    _playerVibrator.Vibrate(_AxehitPlayerVibrations);
                }
            }
            else
            {
                if (_enableDaggerHitPlayerVibration)
                {
                    _playerVibrator.Vibrate(_DaggerhitPlayerVibrations);
                }
            }
        }
    }
コード例 #3
0
ファイル: MeleeAttack.cs プロジェクト: symbol24/ProjectJuice
 protected virtual void OnMeleeConsumed(ConsumingObjectEventArgs e)
 {
     try
     {
         if (MeleeConsumed != null) MeleeConsumed(this, e);
     }
     catch(Exception ex) { ex.Log(); throw; }
 }