Пример #1
0
        public LogicActionInfo(LogicAction logicAction, AssetProvider assetProvider)
        {
            if (logicAction == null)
            {
                throw new ArgumentNullException(nameof(logicAction));
            }
            if (assetProvider == null)
            {
                throw new ArgumentNullException(nameof(assetProvider));
            }

            Type          = logicAction.type;
            BoolValue     = logicAction.boolValue;
            IntValue      = logicAction.intValue;
            FloatValue    = logicAction.floatValue;
            StringValue   = logicAction.stringValue;
            AffectionType = logicAction.affectionType;
            ResourceType  = logicAction.resourceType;
            PuzzleState   = logicAction.puzzleState;

            LocationDefinitionID = logicAction.locationDefinition?.id ?? -1;
            GirlPairDefinitionID = logicAction.girlPairDefinition?.id ?? -1;
            ItemDefinitionID     = logicAction.itemDefinition?.id ?? -1;
            GirlDefinitionID     = logicAction.girlDefinition?.id ?? -1;
            CutsceneDefinitionID = logicAction.cutsceneDefinition?.id ?? -1;

            if (logicAction.backgroundMusic != null)
            {
                BackgroundMusic = new AudioKlipInfo(logicAction.backgroundMusic, assetProvider);
            }
        }
Пример #2
0
 public LogicActionInfo(LogicActionType type,
                        PuzzleAffectionType affectionType,
                        PuzzleResourceType resourceType,
                        PuzzleGameState puzzleState,
                        string stringValue,
                        float floatValue,
                        int intValue,
                        int locationDefinitionID,
                        int girlPairDefinitionID,
                        int cutsceneDefinitionID,
                        int itemDefinitionID,
                        int girlDefinitionID,
                        bool boolValue,
                        AudioKlipInfo backgroundMusic)
 {
     Type                 = type;
     BoolValue            = boolValue;
     IntValue             = intValue;
     FloatValue           = floatValue;
     StringValue          = stringValue;
     LocationDefinitionID = locationDefinitionID;
     GirlPairDefinitionID = girlPairDefinitionID;
     AffectionType        = affectionType;
     ResourceType         = resourceType;
     CutsceneDefinitionID = cutsceneDefinitionID;
     PuzzleState          = puzzleState;
     ItemDefinitionID     = itemDefinitionID;
     GirlDefinitionID     = girlDefinitionID;
     BackgroundMusic      = backgroundMusic;
 }
Пример #3
0
        public AbilityStepInfo(AbilityStepSubDefinition def, AssetProvider assetProvider)
        {
            if (def == null)
            {
                throw new ArgumentNullException(nameof(def));
            }
            if (assetProvider == null)
            {
                throw new ArgumentNullException(nameof(assetProvider));
            }

            StepType          = def.stepType;
            Handle            = def.handle;
            ValueRef          = def.valueRef;
            PuzzleSetRef      = def.puzzleSetRef;
            MinRequirement    = def.minRequirement;
            ResourceType      = def.resourceType;
            AffectionType     = def.affectionType;
            Negative          = def.negative;
            OppositeGirl      = def.oppositeGirl;
            ValueType         = def.valueType;
            Min               = def.min;
            Max               = def.max;
            CombineValues     = def.combineValues;
            CombineOperation  = def.combineOperation;
            ResourceMaxValue  = def.resourceMaxValue;
            GirlValueType     = def.girlValueType;
            ConditionType     = def.conditionType;
            PercentOfValue    = def.percentOfValue;
            OrCheck           = def.orCheck;
            Limit             = def.limit;
            Merged            = def.merged;
            FlatMerge         = def.flatMerge;
            Weighted          = def.weighted;
            VisualEffectType  = def.visualEffectType;
            EnergyType        = def.energyType;
            SplashText        = def.splashText;
            AilmentItemType   = def.ailmentItemType;
            AilmentAlterType  = def.ailmentAlterType;
            AilmentTargetType = def.ailmentTargetType;
            AilmentIndex      = def.ailmentIndex;

            AilmentDefinitionID = def.ailmentDefinition?.id ?? -1;
            EnergyDefinitionID  = def.energyDefinition?.id ?? -1;

            if (def.audioKlip != null)
            {
                AudioKlipInfo = new AudioKlipInfo(def.audioKlip, assetProvider);
            }
            if (def.tokenConditionSet != null)
            {
                TokenConditionSetInfo = new TokenConditionSetInfo(def.tokenConditionSet);
            }

            if (def.tokenDefinitions != null)
            {
                TokenDefinitionIDs = def.tokenDefinitions.Select(x => x.id).ToList();
            }
        }
Пример #4
0
 public CutsceneStepInfo(CutsceneStepType stepType,
                         CutsceneStepProceedType proceedType,
                         CutsceneStepDollTargetType dollTargetType,
                         GirlExpressionType expressionType,
                         DollOrientationType targetDollOrientation,
                         DollPositionType dollPositionType,
                         CutsceneStepAnimationType animationType,
                         CutsceneStepSubCutsceneType subCutsceneType,
                         GirlPairRelationshipType girlPairRelationshipType,
                         CutsceneStepNotificationType notificationType,
                         string specialStepPrefabName,
                         string bannerTextPrefabName,
                         string windowPrefabName,
                         string emitterBehaviorName,
                         string stringValue,
                         float floatValue,
                         float proceedFloat,
                         int targetGirlDefinitionID,
                         int girlDefinitionID,
                         int expressionIndex,
                         int hairstyleIndex,
                         int outfitIndex,
                         int intValue,
                         int easeType,
                         int editorSelectedBranchIndex,
                         int dialogTriggerDefinitionID,
                         int editorSelectedOptionIndex,
                         int subCutsceneDefinitionID,
                         bool skipStep,
                         bool targetAlt,
                         bool boolValue,
                         bool setMood,
                         bool proceedBool,
                         LogicActionInfo logicActionInfo,
                         DialogLineInfo dialogLineInfo,
                         AudioKlipInfo audioKlipInfo,
                         VectorInfo positionInfo,
                         List <CutsceneDialogOptionInfo> dialogOptionInfos,
                         List <CutsceneBranchInfo> branchInfos)
 {
     SkipStep                  = skipStep;
     StepType                  = stepType;
     ProceedType               = proceedType;
     DollTargetType            = dollTargetType;
     TargetGirlDefinitionID    = targetGirlDefinitionID;
     TargetDollOrientation     = targetDollOrientation;
     TargetAlt                 = targetAlt;
     BoolValue                 = boolValue;
     IntValue                  = intValue;
     FloatValue                = floatValue;
     StringValue               = stringValue;
     EaseType                  = easeType;
     EditorSelectedBranchIndex = editorSelectedBranchIndex;
     BranchInfos               = branchInfos;
     LogicActionInfo           = logicActionInfo;
     SpecialStepPrefabName     = specialStepPrefabName;
     ExpressionType            = expressionType;
     SetMood                   = setMood;
     DialogLineInfo            = dialogLineInfo;
     DialogTriggerDefinitionID = dialogTriggerDefinitionID;
     EditorSelectedOptionIndex = editorSelectedOptionIndex;
     DialogOptionInfos         = dialogOptionInfos;
     DollPositionType          = dollPositionType;
     GirlDefinitionID          = girlDefinitionID;
     ExpressionIndex           = expressionIndex;
     HairstyleIndex            = hairstyleIndex;
     OutfitIndex               = outfitIndex;
     BannerTextPrefabName      = bannerTextPrefabName;
     AnimationType             = animationType;
     SubCutsceneType           = subCutsceneType;
     SubCutsceneDefinitionID   = subCutsceneDefinitionID;
     GirlPairRelationshipType  = girlPairRelationshipType;
     WindowPrefabName          = windowPrefabName;
     AudioKlipInfo             = audioKlipInfo;
     EmitterBehaviorName       = emitterBehaviorName;
     PositionInfo              = positionInfo;
     NotificationType          = notificationType;
     ProceedBool               = proceedBool;
     ProceedFloat              = proceedFloat;
 }
Пример #5
0
        public CutsceneStepInfo(CutsceneStepSubDefinition cutsceneStep, AssetProvider assetProvider)
        {
            if (cutsceneStep == null)
            {
                throw new ArgumentNullException(nameof(cutsceneStep));
            }
            if (assetProvider == null)
            {
                throw new ArgumentNullException(nameof(assetProvider));
            }

            SkipStep                  = cutsceneStep.skipStep;
            StepType                  = cutsceneStep.stepType;
            ProceedType               = cutsceneStep.proceedType;
            DollTargetType            = cutsceneStep.dollTargetType;
            TargetDollOrientation     = cutsceneStep.targetDollOrientation;
            TargetAlt                 = cutsceneStep.targetAlt;
            BoolValue                 = cutsceneStep.boolValue;
            IntValue                  = cutsceneStep.intValue;
            FloatValue                = cutsceneStep.floatValue;
            StringValue               = cutsceneStep.stringValue;
            EaseType                  = (int)cutsceneStep.easeType;
            EditorSelectedBranchIndex = cutsceneStep.editorSelectedBranchIndex;
            ExpressionType            = cutsceneStep.expressionType;
            SetMood = cutsceneStep.setMood;
            EditorSelectedOptionIndex = cutsceneStep.editorSelectedOptionIndex;
            DollPositionType          = cutsceneStep.dollPositionType;
            ExpressionIndex           = cutsceneStep.expressionIndex;
            HairstyleIndex            = cutsceneStep.hairstyleIndex;
            OutfitIndex              = cutsceneStep.outfitIndex;
            AnimationType            = cutsceneStep.animationType;
            SubCutsceneType          = cutsceneStep.subCutsceneType;
            GirlPairRelationshipType = cutsceneStep.girlPairRelationshipType;
            NotificationType         = cutsceneStep.notificationType;
            ProceedBool              = cutsceneStep.proceedBool;
            ProceedFloat             = cutsceneStep.proceedFloat;

            SubCutsceneDefinitionID   = cutsceneStep.subCutsceneDefinition?.id ?? -1;
            DialogTriggerDefinitionID = cutsceneStep.dialogTriggerDefinition?.id ?? -1;
            GirlDefinitionID          = cutsceneStep.girlDefinition?.id ?? -1;
            TargetGirlDefinitionID    = cutsceneStep.targetGirlDefinition?.id ?? -1;

            assetProvider.NameAndAddAsset(ref SpecialStepPrefabName, cutsceneStep.specialStepPrefab);
            assetProvider.NameAndAddAsset(ref WindowPrefabName, cutsceneStep.windowPrefab);
            assetProvider.NameAndAddAsset(ref EmitterBehaviorName, cutsceneStep.emitterBehavior);
            assetProvider.NameAndAddAsset(ref BannerTextPrefabName, cutsceneStep.bannerTextPrefab);

            if (cutsceneStep.audioKlip != null)
            {
                AudioKlipInfo = new AudioKlipInfo(cutsceneStep.audioKlip, assetProvider);
            }
            if (cutsceneStep.position != null)
            {
                PositionInfo = new VectorInfo(cutsceneStep.position);
            }
            if (cutsceneStep.dialogLine != null)
            {
                DialogLineInfo = new DialogLineInfo(cutsceneStep.dialogLine, assetProvider);
            }
            if (cutsceneStep.logicAction != null)
            {
                LogicActionInfo = new LogicActionInfo(cutsceneStep.logicAction, assetProvider);
            }

            if (cutsceneStep.dialogOptions != null)
            {
                DialogOptionInfos = cutsceneStep.dialogOptions.Select(x => new CutsceneDialogOptionInfo(x, assetProvider)).ToList();
            }
            if (cutsceneStep.branches != null)
            {
                BranchInfos = cutsceneStep.branches.Select(x => new CutsceneBranchInfo(x, assetProvider)).ToList();
            }
        }
Пример #6
0
 public AbilityStepInfo(AbilityStepType stepType,
                        AbilityStepValueType valueType,
                        PuzzleResourceType resourceType,
                        PuzzleAffectionType affectionType,
                        AbilityStepConditionType conditionType,
                        AbilityStepVisualEffectType visualEffectType,
                        AbilityStepVisualEffectEnergyType energyType,
                        AbilityStepAilmentAlterType ailmentAlterType,
                        AbilityStepAilmentTargetType ailmentTargetType,
                        NumberCombineOperation combineOperation,
                        GirlValueType girlValueType,
                        ItemType ailmentItemType,
                        string handle,
                        string valueRef,
                        string puzzleSetRef,
                        string minRequirement,
                        string min,
                        string max,
                        string splashText,
                        string limit,
                        float percentOfValue,
                        int ailmentIndex,
                        int ailmentDefinitionID,
                        int energyDefinitionID,
                        bool negative,
                        bool oppositeGirl,
                        bool orCheck,
                        bool merged,
                        bool flatMerge,
                        bool resourceMaxValue,
                        bool weighted,
                        TokenConditionSetInfo tokenConditionSetInfo,
                        AudioKlipInfo audioKlipInfo,
                        List <int> tokenDefinitionIDs,
                        List <string> combineValues)
 {
     StepType              = stepType;
     Handle                = handle;
     ValueRef              = valueRef;
     PuzzleSetRef          = puzzleSetRef;
     MinRequirement        = minRequirement;
     ResourceType          = resourceType;
     AffectionType         = affectionType;
     Negative              = negative;
     OppositeGirl          = oppositeGirl;
     ValueType             = valueType;
     Min                   = min;
     Max                   = max;
     CombineValues         = combineValues;
     CombineOperation      = combineOperation;
     ResourceMaxValue      = resourceMaxValue;
     GirlValueType         = girlValueType;
     ConditionType         = conditionType;
     PercentOfValue        = percentOfValue;
     OrCheck               = orCheck;
     TokenConditionSetInfo = tokenConditionSetInfo;
     Limit                 = limit;
     Merged                = merged;
     FlatMerge             = flatMerge;
     TokenDefinitionIDs    = tokenDefinitionIDs;
     Weighted              = weighted;
     AilmentDefinitionID   = ailmentDefinitionID;
     VisualEffectType      = visualEffectType;
     EnergyType            = energyType;
     EnergyDefinitionID    = energyDefinitionID;
     SplashText            = splashText;
     AudioKlipInfo         = audioKlipInfo;
     AilmentItemType       = ailmentItemType;
     AilmentAlterType      = ailmentAlterType;
     AilmentTargetType     = ailmentTargetType;
     AilmentIndex          = ailmentIndex;
 }