public override void OnAnimEvent(AnimEventID id) { base.OnAnimEvent(id); if (id == AnimEventID.ShakingOffDamage) { Vector3 hit_dir = new Vector3(UnityEngine.Random.Range(0f, 1f), UnityEngine.Random.Range(0f, 1f), UnityEngine.Random.Range(0f, 1f)); hit_dir.Normalize(); this.m_Player.GiveDamage(null, null, 10f, hit_dir, DamageType.Insects, 0, false); return; } if (id == AnimEventID.ShakingOffEnd) { this.Stop(); return; } if (id == AnimEventID.WaspsFlyAwayLHand) { InsectsManager.Get().FlyAway(Hand.Left); return; } if (id == AnimEventID.WaspsFlyAwayRHand) { InsectsManager.Get().FlyAway(Hand.Right); } }
public override void OnAnimEvent(AnimEventID id) { if (id == AnimEventID.HarvestingEnd) { this.m_AnimLoops++; if (this.m_AnimLoops == Skill.Get <HarvestingAnimalsSkill>().GetAnimationsCount()) { this.m_Animator.SetTrigger(this.m_HarvestingFinishHash); return; } } else { if (id == AnimEventID.HarvestingFinishEnd) { this.m_Animator.SetTrigger(this.m_HarvestingAnimalEndHash); this.m_End = true; return; } if (id == AnimEventID.HarvestingSpawnFX) { ParticlesManager.Get().Spawn("Animal Harvest", Camera.main.transform.position + Camera.main.transform.forward * 0.1f + Vector3.down * 0.5f, Player.Get().transform.rotation, Vector3.zero, null, -1f, false); } } }
public override void OnAnimEvent(AnimEventID id) { base.OnAnimEvent(id); if (id == AnimEventID.FishingCastEnd) { if (!this.m_Target.IsZero()) { this.SetState(FishingController.State.Waiting); } else { this.SetState(FishingController.State.Reel); } } else if (id == AnimEventID.FishingStrikeEnd || id == AnimEventID.FishingReelEnd) { if (this.m_FishingRod.m_Fish) { this.SetState(FishingController.State.Fish); } else { this.SetState(FishingController.State.None); } this.m_Player.UnblockMoves(); this.m_FishingRod.StopFishing(); } }
public override void OnAnimEvent(AnimEventID id) { base.OnAnimEvent(id); if (id == AnimEventID.FishingCastEnd) { if (!this.m_Target.IsZero()) { this.SetState(FishingController.State.Waiting); return; } this.SetState(FishingController.State.Reel); return; } else { if (id == AnimEventID.FishingStrikeEnd) { this.SetState(FishingController.State.Idle); this.ShowFish(); this.m_FishingRod.StopFishing(); return; } if (id == AnimEventID.FishingHideVein && this.m_FishingRod) { this.m_FishingRod.m_HideVein = true; } return; } }
public override void OnAnimEvent(AnimEventID id) { base.OnAnimEvent(id); if (id == AnimEventID.GrabItem || id == AnimEventID.DrinkLiquid) { if (this.m_TriggerToExecute) { this.m_TriggerToExecute.OnExecute(this.m_TriggerActionToExecute); this.m_TriggerActionToExecute = TriggerAction.TYPE.None; this.m_LastTrigerExecutionTime = Time.time; this.m_TriggerToExecute = null; } } else if (id == AnimEventID.GrabItemEnd) { this.m_Animator.SetBool(TriggerController.s_BGrabItem, false); this.m_Animator.SetBool(TriggerController.s_BGrabItemBow, false); this.m_Animator.SetBool(TriggerController.s_BGrabItemBambooBow, false); this.m_TriggerToExecute = null; } else if (id == AnimEventID.DrinkLiquidEnd) { this.m_Animator.SetBool(this.m_BDrinkWater, false); this.m_TriggerInAction = false; } }
public override void OnAnimEvent(AnimEventID id) { if (id == AnimEventID.ShowMap) { this.m_Map.gameObject.SetActive(true); return; } if (id == AnimEventID.ShowMapEnd) { this.m_CanDisable = true; if (!this.m_CursorVisible && GreenHellGame.IsPCControllerActive()) { CursorManager.Get().ShowCursor(true, false); this.m_CursorVisible = true; } HUDMap.Get().Activate(); return; } if (id == AnimEventID.HideMapEnd) { this.Stop(); return; } base.OnAnimEvent(id); }
public void OnAnimEvent(AnimEventID id) { if (id == AnimEventID.CureMachineRClapOpenEnd) { if (this.m_State != CureMachine.State.Success) { this.SetState(CureMachine.State.WaitingForItem); return; } } else { if (id == AnimEventID.CureMachineRClapCloseEnd) { this.SetState(CureMachine.State.Processing); return; } if (id == AnimEventID.CureMachineProcessingEnd && this.m_ItemSlot.m_Item) { if (this.m_ItemSlot.m_Item.GetInfoID() == this.m_ProperItemID) { this.SetState(CureMachine.State.Success); return; } this.SetState(CureMachine.State.Fail); } } }
public override void OnAnimEvent(AnimEventID id) { base.OnAnimEvent(id); if (id == AnimEventID.BowShotEnd) { if (this.m_State == BowController.State.Shot) { this.ShotEnd(); return; } } else { if (id == AnimEventID.BowReloadEnd) { this.SetState(BowController.State.Idle); return; } if (id == AnimEventID.GrabItemShowArrow) { this.ShowArrow(true); return; } if (id == AnimEventID.GrabItemHideArrow) { this.ShowArrow(false); return; } if (id == AnimEventID.WatchStart) { this.CheckForWatchHide(); } } }
public override void OnAnimEvent(AnimEventID id) { base.OnAnimEvent(id); if (id == AnimEventID.MeleeRightAttackStart) { this.m_AttackDirection = AttackDirection.Right; this.m_Animator.SetBool(this.m_BAttackLeft, false); base.SetState(WeaponControllerState.Swing); } else if (id == AnimEventID.MeleeLeftAttackStart) { this.m_AttackDirection = AttackDirection.Left; this.m_Animator.SetBool(this.m_BAttackRight, false); base.SetState(WeaponControllerState.Swing); } else if (id == AnimEventID.MeleeUpAttackStart) { this.m_AttackDirection = AttackDirection.Up; base.SetState(WeaponControllerState.Swing); } else if (id == AnimEventID.MeleeRightAttackEnd) { this.PlayerMeleeRightAttackEnd(); } else if (id == AnimEventID.MeleeUpAttackEnd) { this.PlayerMeleeUpAttackEnd(); } else if (id == AnimEventID.MeleeLeftAttackEnd) { this.PlayerMeleeLeftAttackEnd(); } }
public void OnAnimEvent(AnimEventID id) { if (id == AnimEventID.BowTrapShootArrow) { this.ShootArrow(); } }
public override void OnAnimEvent(AnimEventID id) { if (id == AnimEventID.ObjectSwingEnd) { this.SetState(ItemController.State.FinishSwing); return; } if (id == AnimEventID.ObjectThrow && this.m_State == ItemController.State.Throw) { this.Throw(); return; } if (id == AnimEventID.FireIgnite) { if (this.m_FireObjectToIgnite != null) { this.m_FireObjectToIgnite.Ignite(); Player.Get().SetWantedItem(Hand.Right, null, true); UnityEngine.Object.Destroy(this.m_Item.gameObject); this.m_FireObjectToIgnite = null; return; } } else { base.OnAnimEvent(id); } }
public void OnAnimEvent(AnimEventID id) { if (id == AnimEventID.ShamanAttackEnd) { if (ShamanManager.Get().m_AttackVersion == ShamanManager.AttackVersion.Fast) { if (base.transform.position.Distance(this.m_Player.transform.position) <= this.m_Agent.stoppingDistance) { this.SetState(Shaman.State.Attack); return; } this.SetState(Shaman.State.MoveToPlayer); return; } else if (ShamanManager.Get().m_AttackVersion == ShamanManager.AttackVersion.Slow) { if (this.m_AttacksCount == 0 && base.transform.position.Distance(this.m_Player.transform.position) <= this.m_Agent.stoppingDistance && UnityEngine.Random.Range(0f, 1f) > this.m_DoubleAttackChance) { this.SetState(Shaman.State.Attack); this.m_AttacksCount++; return; } this.SetState(Shaman.State.Idle); this.m_AttacksCount = 0; return; } } else if (id == AnimEventID.ShamanDamage) { this.TryGiveDamage(); } }
public override void OnAnimEvent(AnimEventID id) { if (id == AnimEventID.SpawnWashingLHandFX) { Transform lhand = Player.Get().GetLHand(); this.m_LHandParticle = ParticlesManager.Get().Spawn("fx_washing_player", lhand.position, Quaternion.identity, Vector3.zero, null, -1f, false); return; } if (id == AnimEventID.SpawnWashingRHandFX) { Transform rhand = Player.Get().GetRHand(); this.m_RHandParticle = ParticlesManager.Get().Spawn("fx_washing_player", rhand.position, Quaternion.identity, Vector3.zero, null, -1f, false); return; } if (id == AnimEventID.DestroyWashingLHandFX) { ParticlesManager.Get().Remove(this.m_LHandParticle); this.m_LHandParticle = null; return; } if (id == AnimEventID.DestroyWashingRHandFX) { ParticlesManager.Get().Remove(this.m_RHandParticle); this.m_RHandParticle = null; } }
public override void OnAnimEvent(AnimEventID id) { base.OnAnimEvent(id); if (id == AnimEventID.RecoverEnd) { this.m_Animator.SetInteger(this.m_PassOutHash, 0); } }
public override void OnAnimEvent(AnimEventID id) { base.OnAnimEvent(id); if (id == AnimEventID.PlaySwingSound && this.CanPlaySwingSound()) { this.PlaySwingSound(); } }
public override void OnAnimEvent(AnimEventID id) { base.OnAnimEvent(id); if (id == AnimEventID.BowShot) { this.Shot(); } }
public override void OnAnimEvent(AnimEventID id) { base.OnAnimEvent(id); if (this.m_ActiveGoal != null) { this.m_ActiveGoal.OnAnimEvent(id); } }
public override void OnAnimEvent(AnimEventID id) { base.OnAnimEvent(id); if (id == AnimEventID.SwitchWeapon) { this.m_AI.SwitchWeapon(); } }
public override void OnAnimEvent(AnimEventID id) { base.OnAnimEvent(id); if (id == AnimEventID.DemoHitReaction) { PostProcessManager.Get().SetWeight(PostProcessManager.Effect.Blood, 1f); } }
public override void OnAnimEvent(AnimEventID id) { base.OnAnimEvent(id); if (id == AnimEventID.HitReactionEnd) { this.Stop(); } }
public override void OnAnimEvent(AnimEventID id) { base.OnAnimEvent(id); if (id == AnimEventID.RecoverEnd) { this.m_Animator.SetBool(this.m_StandUpHash, false); } }
public override void OnAnimEvent(AnimEventID id) { base.OnAnimEvent(id); if (id == AnimEventID.ThrowStone) { this.Throw(); } }
public override void OnAnimEvent(AnimEventID id) { base.OnAnimEvent(id); if (id == AnimEventID.FootStep) { this.PlayFootstepSound(); } }
public override void OnAnimEvent(AnimEventID id) { base.OnAnimEvent(id); if (id == AnimEventID.AnimationTriggerEnd) { this.Stop(); } }
public override void OnAnimEvent(AnimEventID id) { base.OnAnimEvent(id); if (id == AnimEventID.BowShotEnd) { this.m_Finish = true; } }
public override void OnAnimEvent(AnimEventID id) { if (id == AnimEventID.LadderSound) { PlayerAudioModule.Get().PlayLadderSound(); return; } base.OnAnimEvent(id); }
public override void OnAnimEvent(AnimEventID id) { base.OnAnimEvent(id); if (this.m_AI.m_HealthModule && this.m_AI.m_HealthModule.m_IsDead) { return; } if (id == AnimEventID.RattlesnakeAttack) { this.PlayAttackSound(); } }
public override void OnAnimEvent(AnimEventID id) { base.OnAnimEvent(id); if (this.m_State == SwimState.Dive && (id == AnimEventID.DiveSound0 || id == AnimEventID.DiveSound1 || id == AnimEventID.DiveSound2)) { PlayerAudioModule.Get().PlayDiveSound(); } else if (this.m_State == SwimState.Swim && (id == AnimEventID.SwimSound0 || id == AnimEventID.SwimSound1 || id == AnimEventID.SwimSound2)) { PlayerAudioModule.Get().PlaySwimSound(); } }
public override void OnAnimEvent(AnimEventID id) { if (id == AnimEventID.MudMixerEnd) { this.m_Finish = true; return; } if (id == AnimEventID.MudMixerGetDirty) { PlayerConditionModule.Get().GetDirtinessAdd(GetDirtyReason.UsingMud, null); } }
public override void OnAnimEvent(AnimEventID id) { base.OnAnimEvent(id); if (this.m_AI.m_HealthModule && this.m_AI.m_HealthModule.m_IsDead) { return; } if (id == AnimEventID.GiveDamage && !this.GivePlayerDamage()) { this.GiveConstructionDamage(); } }