예제 #1
0
 void OnDestroy()
 {
     if (CameraFade.InstanceExists())
     {
         CameraFade.Instance.m_OnFadeFinish -= ActivateManualty;
     }
 }
예제 #2
0
 void OnDestroy()
 {
     if (CameraFade.InstanceExists())
     {
         CameraFade.Instance.m_OnFadeFinish -= RestartScene;
     }
 }
예제 #3
0
 void OnDestroy()
 {
     if (CameraFade.InstanceExists())
     {
         CameraFade.Instance.m_OnFadeFinish -= LoadLevel;
     }
 }
예제 #4
0
 public override void OnUserClick()
 {
     if (!PauseManager.IsPaused() && !CameraFade.InstanceExists() && CanDestroyOnClick)
     {
         Destroy();
     }
 }
예제 #5
0
 protected virtual void OnDoubleClick()
 {
     if (enabled && !CameraFade.InstanceExists())
     {
         if (KiltCamTrigger.ContainsFlag(KiltCamTriggerEnum.OnDoubleClick) || Trigger == ButtonTrigger.OnDoubleClick)
         {
             CheckSend();
         }
     }
 }
 protected override void OnPress(bool isPressed)
 {
     if (enabled && !CameraFade.InstanceExists())
     {
         if (!Started)
         {
             Start();
         }
         InitTween(tweenTarget, duration, isPressed ? pressed : (KiltUICamera.IsHighlighted(gameObject) ? hover : mColor));
     }
 }
 protected override void OnHover(bool isOver)
 {
     if (enabled && !CameraFade.InstanceExists())
     {
         if (!Started)
         {
             Start();
         }
         InitTween(tweenTarget, duration, isOver ? hover : mColor);
         Highlighted = isOver;
     }
 }
예제 #8
0
    void OnDestroy()
    {
        if (current == exitGame)
        {
            SteamAPI.Shutdown();
        }

        if (CameraFade.InstanceExists())
        {
            CameraFade.Instance.m_OnFadeFinish -= ActivateManualty;
        }
    }
예제 #9
0
 protected virtual void OnHover(bool isOver)
 {
     if (enabled && !CameraFade.InstanceExists())
     {
         if (((isOver && (KiltCamTrigger.ContainsFlag(KiltCamTriggerEnum.OnMouseOver) || Trigger == ButtonTrigger.OnMouseOver)) ||
              (!isOver && (KiltCamTrigger.ContainsFlag(KiltCamTriggerEnum.OnMouseOut) || Trigger == ButtonTrigger.OnMouseOut))))
         {
             CheckSend();
         }
         Highlighted = isOver;
     }
 }
예제 #10
0
 protected override void OnPress(bool isPressed)
 {
     if (enabled && !CameraFade.InstanceExists())
     {
         if (!Started)
         {
             Start();
         }
         InitTween(tweenTarget.gameObject, duration, isPressed ? Vector3.Scale(_scale, pressed) :
                   (KiltUICamera.IsHighlighted(gameObject) ? Vector3.Scale(_scale, hover) : _scale));
     }
 }
예제 #11
0
 protected override void OnHover(bool isOver)
 {
     if (enabled && !CameraFade.InstanceExists())
     {
         if (!Started)
         {
             Start();
         }
         InitTween(tweenTarget.gameObject, duration, isOver ? Vector3.Scale(_scale, hover) : _scale);
         Highlighted = isOver;
     }
 }
예제 #12
0
 protected virtual void OnPress(bool isPressed)
 {
     if (enabled && !CameraFade.InstanceExists())
     {
         UpdateOldPos();
         UpdateKinematicOnPress(isPressed);
         if (((isPressed && (KiltCamTrigger.ContainsFlag(KiltCamTriggerEnum.OnPress) || Trigger == ButtonTrigger.OnPress)) ||
              (!isPressed && (KiltCamTrigger.ContainsFlag(KiltCamTriggerEnum.OnRelease) || Trigger == ButtonTrigger.OnRelease))))
         {
             CheckSend();
         }
     }
 }
예제 #13
0
 public void Play(bool p_force = false)
 {
     if (p_force || CanPlayInFade || !CameraFade.InstanceExists())
     {
         if (IsBackgroundMusic)
         {
             AudioManager.PlayBackgroundMusic(Clip);
         }
         else
         {
             AudioManager.PlaySound(Clip, Loop, OneSoundOfThisTypeOnly, this.gameObject);
         }
     }
 }
예제 #14
0
    public float ApplyDamage(float p_damage, bool p_forceApplyDamage = false, bool p_forceDestroyImmediate = false, bool p_isTrueDamage = false)
    {
        float v_damageApplyed = 0;

        if (!CameraFade.InstanceExists())
        {
            p_damage = p_isTrueDamage? p_damage : p_damage * Defense;
            if (p_damage >= MinDamageToShowCollisionEffect || p_forceApplyDamage)
            {
                DamageEventArgs v_args = new DamageEventArgs(this, p_damage);
                //CallEvent OnDamage
                if (p_damage > 0)
                {
                    if (OnDamaged != null)
                    {
                        OnDamaged(v_args);
                    }

                    CurrentLife -= v_args.Damage;
                    if (CurrentLife <= 0)
                    {
                        if (p_forceDestroyImmediate)
                        {
                            Destroy();
                        }
                        else
                        {
                            MarkToDie();
                        }
                    }
                    v_damageApplyed = p_damage;
                }
            }
        }
        return(v_damageApplyed);
    }