void OnDestroy() { if (CameraFade.InstanceExists()) { CameraFade.Instance.m_OnFadeFinish -= ActivateManualty; } }
void OnDestroy() { if (CameraFade.InstanceExists()) { CameraFade.Instance.m_OnFadeFinish -= RestartScene; } }
void OnDestroy() { if (CameraFade.InstanceExists()) { CameraFade.Instance.m_OnFadeFinish -= LoadLevel; } }
public override void OnUserClick() { if (!PauseManager.IsPaused() && !CameraFade.InstanceExists() && CanDestroyOnClick) { Destroy(); } }
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; } }
void OnDestroy() { if (current == exitGame) { SteamAPI.Shutdown(); } if (CameraFade.InstanceExists()) { CameraFade.Instance.m_OnFadeFinish -= ActivateManualty; } }
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; } }
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)); } }
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; } }
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(); } } }
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); } } }
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); }