public sealed override void OnExecute(GenericSkill skillSlot) { var data = skillSlot.skillInstanceData as SniperPrimaryInstanceData; EntityState state = this.InstantiateNextState(skillSlot); if (data.isReloading) { //var reloadState = state as ISniperReloadState; } else { var fireState = state as ISnipeState; fireState.reloadBoost = this.reloadParams.GetBoost(data.currentReloadTier); } EntityStateMachine machine = data.isReloading ? data.reloadStatemachine : skillSlot.stateMachine; if (machine.SetInterruptState(state, data.isReloading ? this.reloadInterruptPriority : base.interruptPriority)) { CharacterBody body = skillSlot.characterBody; if (data.isReloading) { if (body) { if (this.noSprintReload) { body.isSprinting = false; } body.OnSkillActivated(skillSlot); } data.StopReload(); } else { if (body) { if (base.cancelSprintingOnActivation) { body.isSprinting = false; } body.OnSkillActivated(skillSlot); } skillSlot.stock -= base.stockToConsume; data.OnStockChanged(); data.delayTimer = 0f; if (skillSlot.stock <= 0) { data.SetNeedsReload(); } } } }
void PlayDeathAnimation() { EntityStateMachine entityStateMachine = EntityStateMachine.FindByCustomName(base.gameObject, "Body"); if (entityStateMachine == null) { return; } //entityStateMachine.SetState(EntityState.Instantiate(EntityStates.BrotherMonster.TrueDeathState)); //characterBody.SetBodyStateToPreferredInitialState //entityStateMachine.SetInterruptState(EntityState.Instantiate(new SerializableEntityStateType(typeof(EntityStates.BrotherMonster.TrueDeathState))), InterruptPriority.Death); entityStateMachine.SetInterruptState(new KneelState(), InterruptPriority.Death); //base.PlayAnimation("FullBody Override", "TrueDeath"); characterBody.moveSpeed = 0f; characterBody.characterDirection.moveVector = characterBody.characterDirection.forward; }
// Token: 0x06002D25 RID: 11557 RVA: 0x000BEA2C File Offset: 0x000BCC2C public override void FixedUpdate() { base.FixedUpdate(); if (NetworkServer.active) { this.FixedUpdateServer(); } if (this.startTime.timeSince > FadeOut.duration) { foreach (CharacterBody characterBody in CharacterBody.readOnlyInstancesList) { if (characterBody.hasEffectiveAuthority) { EntityStateMachine entityStateMachine = EntityStateMachine.FindByCustomName(characterBody.gameObject, "Body"); if (entityStateMachine && !(entityStateMachine.state is Idle)) { entityStateMachine.SetInterruptState(new Idle(), InterruptPriority.Frozen); } } } } }
public sealed override void OnExecute(GenericSkill skillSlot) { var data = skillSlot.skillInstanceData as ReactivationInstanceData; EntityState state = this.InstantiateNextState(skillSlot); EntityStateMachine mach = data.waitingOnReactivation? data.reactivationStateMachine : skillSlot.stateMachine; if (mach.SetInterruptState(state, data.waitingOnReactivation ? this.reactivationInterruptPriority : this.interruptPriority)) { if (!data.waitingOnReactivation) { skillSlot.stock -= this.stockToConsume; data.OnExecution(); } else { data.InvalidateReactivation(); } if (skillSlot.characterBody) { skillSlot.characterBody.OnSkillActivated(skillSlot); } } }