private static float getStartTick(IStoryAction <UintT> storyAction, CM.FireBoltAction fireBoltAction, CM.Animation effectingAnimation) { float startTick = 0; startTick = storyAction.Time.Start.ToMillis(cm.MillisPerTick); startTick += getEffectorAnimationOffset(effectingAnimation, fireBoltAction); return(startTick); }
private static float getEndTick(IStoryAction <UintT> storyAction, CM.FireBoltAction fireBoltAction, CM.Animation effectingAnimation, float startTick) { float endTick = storyAction.Time.End.ToMillis(cm.MillisPerTick); if (fireBoltAction.MaxDuration.HasValue && fireBoltAction.MaxDuration.Value < storyAction.Time.End - storyAction.Time.Start) { endTick = startTick + fireBoltAction.MaxDuration.Value; } return(endTick); }
private static float getEffectorAnimationOffset(CM.Animation effectingAnimation, CM.FireBoltAction fireBoltAction) { float offset = 0; if (effectingAnimation != null) { CM.AnimationIndex effectingIndex = effectingAnimation.AnimationIndices.Find(x => x.Name == fireBoltAction.EffectorOffsetIndexName); if (effectingIndex != null) { offset = effectingIndex.TimeOffset; } } return(offset); }