Beispiel #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);
     }
 }
Beispiel #2
0
 private TCRuleApplicationJudgement JudgeApplication(TCRule rule, TCRuleJudgementType judgmentType, string name)
 {
     if (rule == null)
     {
         return(TCRuleApplicationJudgement.NEUTRAL);
     }
     if ((judgmentType == TCRuleJudgementType.CHARACTER ? rule.CharacterApplication : rule.RoomApplication).Included(name))
     {
         return(TCRuleApplicationJudgement.INCLUDED);
     }
     else if ((judgmentType == TCRuleJudgementType.CHARACTER ? rule.CharacterApplication : rule.RoomApplication).Excluded(name))
     {
         return(TCRuleApplicationJudgement.EXCLUDED);
     }
     else
     {
         return(TCRuleApplicationJudgement.NEUTRAL);
     }
 }
Beispiel #3
0
        public bool ExcludeAlwaysCheck(string animationName, string categoryName)
        {
            TCRule rule = RuleByTypeAndName(TCRuleType.ANIMATION, animationName);

            if (rule != null)
            {
                return(rule.ExcludeAlways);
            }
            else
            {
                rule = RuleByTypeAndName(TCRuleType.CATEGORY, categoryName);
                if (rule != null)
                {
                    return(rule.ExcludeAlways);
                }
                else
                {
                    return(false);
                }
            }
        }
        public TCRuleSet GenerateDefaultRuleset()
        {
            Log.LogInfo("Generating Default Ruleset");

            TCRuleSet defaults             = new TCRuleSet();
            TCRule    peepingExclusionRule = new TCRule();

            peepingExclusionRule.Rule          = PositionCategories.PEEPING.ToString();
            peepingExclusionRule.RuleType      = TCRuleType.CATEGORY.ToString();
            peepingExclusionRule.ExcludeAlways = true;
            defaults.Rules.Add(peepingExclusionRule);

            TCRule defaultTimingRule = new TCRule();

            defaultTimingRule.Rule     = "ALL";
            defaultTimingRule.RuleType = TCRuleType.ALL.ToString();
            defaultTimingRule
            .AddTiming(new TCAnimationTiming(TCAnimationStage.IDLE.ToString(), 0, 0, 1f, Ease.Linear.ToString(), LoopType.Yoyo.ToString(), 0f, 0f, 1f, Ease.Linear.ToString()))
            .AddTiming(new TCAnimationTiming(TCAnimationStage.SLOW_LOOP.ToString(), 0f, 1.75f, 2.5f, Ease.InOutCubic.ToString(), LoopType.Yoyo.ToString(), -.1f, 0.1f, 1.5f, Ease.InOutCubic.ToString()))
            .AddTiming(new TCAnimationTiming(TCAnimationStage.FAST_LOOP.ToString(), 1f, 2.75f, 2.5f, Ease.InOutCubic.ToString(), LoopType.Yoyo.ToString(), -.1f, 0.1f, 1.5f, Ease.InOutCubic.ToString()))
            .AddTiming(new TCAnimationTiming(TCAnimationStage.O_LOOP.ToString(), 1f, 2f, 2.5f, Ease.InOutCubic.ToString(), LoopType.Yoyo.ToString(), -.1f, 0.1f, 1.5f, Ease.InOutCubic.ToString()))
            .AddTiming(new TCAnimationTiming(TCAnimationStage.O****M.ToString(), 0, 0, 1f, Ease.Linear.ToString(), LoopType.Yoyo.ToString(), 0f, 0f, 1f, Ease.Linear.ToString()))
            .AddTiming(new TCAnimationTiming(TCAnimationStage.POST_ORGASM.ToString(), 0, 0, 1f, Ease.Linear.ToString(), LoopType.Yoyo.ToString(), 0f, 0f, 1f, Ease.Linear.ToString()));
            defaults.Rules.Add(defaultTimingRule);

            TCRule caressTimingRule = new TCRule();

            caressTimingRule.Rule     = PositionCategories.CARESS.ToString();
            caressTimingRule.RuleType = TCRuleType.CATEGORY.ToString();
            caressTimingRule
            .AddTiming(new TCAnimationTiming(TCAnimationStage.IDLE.ToString(), 0, 0, 1f, Ease.Linear.ToString(), LoopType.Yoyo.ToString(), 0f, 0f, 1f, Ease.Linear.ToString()))
            .AddTiming(new TCAnimationTiming(TCAnimationStage.SLOW_LOOP.ToString(), -.5f, 0.5f, 2.5f, Ease.InOutCubic.ToString(), LoopType.Yoyo.ToString(), -0.1f, 0.1f, 1.5f, Ease.InOutCubic.ToString()))
            .AddTiming(new TCAnimationTiming(TCAnimationStage.FAST_LOOP.ToString(), 0.5f, 1.5f, 2.5f, Ease.InOutCubic.ToString(), LoopType.Yoyo.ToString(), -0.1f, 0.1f, 1.5f, Ease.InOutCubic.ToString()))
            .AddTiming(new TCAnimationTiming(TCAnimationStage.O_LOOP.ToString(), 0f, 1f, 2.5f, Ease.InOutCubic.ToString(), LoopType.Yoyo.ToString(), -0.1f, 0.1f, 1.5f, Ease.InOutCubic.ToString()))
            .AddTiming(new TCAnimationTiming(TCAnimationStage.O****M.ToString(), 0, 0, 1f, Ease.Linear.ToString(), LoopType.Yoyo.ToString(), 0f, 0f, 1f, Ease.Linear.ToString()))
            .AddTiming(new TCAnimationTiming(TCAnimationStage.POST_ORGASM.ToString(), 0, 0, 1f, Ease.Linear.ToString(), LoopType.Yoyo.ToString(), 0f, 0f, 1f, Ease.Linear.ToString()));
            defaults.Rules.Add(caressTimingRule);

            return(defaults);
        }