Exemplo n.º 1
0
 private TCAnimationTiming ExtractStageTiming(TCRule rule, TCAnimationStage stage)
 {
     if (rule == null)
     {
         return(null);
     }
     else
     {
         TCAnimationTiming appliedTiming = rule.AnimationTiming.Find((timing) => timing.stage.Equals(stage.ToString(), StringComparison.OrdinalIgnoreCase));
         if (appliedTiming == null)
         {
             appliedTiming = rule.AnimationTiming.Find((timing) => timing.stage.Equals(TCAnimationStage.ALL.ToString(), StringComparison.OrdinalIgnoreCase));
         }
         return(appliedTiming);
     }
 }
Exemplo n.º 2
0
        public TCAnimationTiming Timing(string animationName, string categoryName, TCAnimationStage stage)
        {
            TCAnimationTiming timing = null;

            timing = ExtractStageTiming(RuleByTypeAndName(TCRuleType.ANIMATION, animationName), stage);
            if (timing == null)
            {
                timing = ExtractStageTiming(RuleByTypeAndName(TCRuleType.CATEGORY, categoryName), stage);
            }
            if (timing == null)
            {
                timing = ExtractStageTiming(RuleByTypeAndName(TCRuleType.ALL, TCRuleType.ALL.ToString()), stage);
            }
            if (timing == null)
            {
                timing = HS2TakeChargePlugin.Instance.GenerateDefaultRuleset().Timing(animationName, categoryName, stage);
            }
            return(timing);
        }
Exemplo n.º 3
0
 public TCRule AddTiming(TCAnimationTiming timing)
 {
     AnimationTiming.Add(timing);
     return(this);
 }