public Macro(BaseEvent eventFrame, Character character) { this.eventFrame = eventFrame; this.character = character; foreach (string s in ((MacroAction)eventFrame.ShowAction()).skills) { remainingSkills.Add(new SkillId(s)); } Entity entity = character.GameObject().GetComponent <EntityReference>().Entity; HeroStateMachineComponent hsmc = entity.GetComponent <HeroStateMachineComponent>(); userInput = (DefaultUserInput)hsmc.UserInput; character.PostSkillCastEventHandler += CharacterOnPostSkillCastEventHandler; }
protected override void OnDelayedAttachAsMain(Character target) { esc = targetEntity.GetComponent <EquippedSkillsComponent>(); hsmc = targetEntity.GetComponent <HeroStateMachineComponent>(); int comboCount = esc.EquippedSkills.ComboCount(); string[] interested = new string[comboCount]; for (int i = 1; i <= comboCount; i++) { interested[i - 1] = StateName.COMBO_ATTACK + i; } string targetStateName = hsmc.HeroStateMachine.GetCurrentStateName(); stateAtAttachMoment = targetStateName; if (interested.Contains(targetStateName)) { for (int i = 0; i < comboCount; i++) { esc.EquippedSkills.GetCombo(i + 1).AttackStateWindow.StartSoonerBy(info.Value); } } int airComboCount = esc.EquippedSkills.JumpAtkCount(); interested = new string[airComboCount]; for (int i = 1; i < airComboCount; i++) { interested[i - 1] = StateName.JUMP_ATTACK + i; } if (interested.Contains(targetStateName)) { for (int i = 0; i < airComboCount; i++) { esc.EquippedSkills.GetJumpAtk(i + 1).AttackStateWindow.StartSoonerBy(info.Value); } } skill.EndChannelingSoonerBy(info.ChannelingValue); skill.EndStateBindingSoonerBy(info.StateBindingValue); }
public StunBreakModifier(ModifierInfo info, Entity casterEntity, Entity targetEntity, Environment environment, CollectionOfInteractions modifierInteractionCollection) : base(info, casterEntity, targetEntity, environment, modifierInteractionCollection) { this.casterEntity = casterEntity; this.targetEntity = targetEntity; this.environment = environment; this.modifierInteractionCollection = modifierInteractionCollection; this.info = (StunBreakInfo)info; bool found; extraStunDuration = targetEntity.GetComponent <StatsComponent>().CharacterStats .FindStats(StatsType.ExtraStunDuration, out found); HeroStateMachineComponent smComponent = targetEntity.GetComponent <HeroStateMachineComponent>(); if (smComponent == null) { smComponent = targetEntity.GetComponent <MonsterStateMachineComponent>(); } userInput = smComponent.UserInput; }
public CcBreakByInputModifier(ModifierInfo info, Entity casterEntity, Entity targetEntity, Modifier parentModifier, CcBreakByInputModifierEventConfig eventConfig, Environment environment, CollectionOfInteractions modifierInteractionCollection) : base(info, casterEntity, targetEntity, environment, modifierInteractionCollection) { this.info = (CcBreakByInputInfo)info; this.parentModifier = parentModifier; this.eventConfig = eventConfig; this.environment = environment; this.modifierInteractionCollection = modifierInteractionCollection; mainLifetimes.Add(new ParentModifierLifetime(parentModifier)); smComponent = targetEntity.GetComponent <HeroStateMachineComponent>(); if (smComponent == null) { smComponent = targetEntity.GetComponent <MonsterStateMachineComponent>(); } userInput = (DefaultUserInput)smComponent.UserInput; EquippedSkills equippedSkills = targetEntity.GetComponent <EquippedSkillsComponent>().EquippedSkills; skillId = equippedSkills.PassiveRecovery2.SkillId; character = targetEntity.GetComponent <SkillComponent>().Character; }