Beispiel #1
0
        public LogicAction ToLogicAction(GameData gameData, AssetProvider assetProvider)
        {
            var newLogicAction = new LogicAction();

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

            newLogicAction.locationDefinition = gameData.Locations.Get(LocationDefinitionID);
            newLogicAction.girlPairDefinition = gameData.GirlPairs.Get(GirlPairDefinitionID);
            newLogicAction.itemDefinition     = gameData.Items.Get(ItemDefinitionID);
            newLogicAction.girlDefinition     = gameData.Girls.Get(GirlDefinitionID);
            newLogicAction.cutsceneDefinition = gameData.Cutscenes.Get(CutsceneDefinitionID);

            if (BackgroundMusic != null)
            {
                newLogicAction.backgroundMusic = BackgroundMusic.ToAudioKlip(assetProvider);
            }

            return(newLogicAction);
        }
Beispiel #2
0
        public CutsceneStepSubDefinition ToCutsceneStep(GameData gameData, AssetProvider assetProvider)
        {
            var newCSS = new CutsceneStepSubDefinition();

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

            newCSS.targetGirlDefinition    = gameData.Girls.Get(TargetGirlDefinitionID);
            newCSS.girlDefinition          = gameData.Girls.Get(GirlDefinitionID);
            newCSS.dialogTriggerDefinition = gameData.DialogTriggers.Get(DialogTriggerDefinitionID);
            newCSS.subCutsceneDefinition   = gameData.Cutscenes.Get(SubCutsceneDefinitionID);

            newCSS.windowPrefab      = (UiWindow)assetProvider.GetAsset(WindowPrefabName);
            newCSS.emitterBehavior   = (EmitterBehavior)assetProvider.GetAsset(EmitterBehaviorName);
            newCSS.specialStepPrefab = (CutsceneStepSpecial)assetProvider.GetAsset(SpecialStepPrefabName);
            newCSS.bannerTextPrefab  = (BannerTextBehavior)assetProvider.GetAsset(BannerTextPrefabName);

            if (DialogLineInfo != null)
            {
                newCSS.dialogLine = DialogLineInfo.ToDialogLine(assetProvider);
            }
            if (LogicActionInfo != null)
            {
                newCSS.logicAction = LogicActionInfo.ToLogicAction(gameData, assetProvider);
            }
            if (AudioKlipInfo != null)
            {
                newCSS.audioKlip = AudioKlipInfo.ToAudioKlip(assetProvider);
            }
            if (PositionInfo != null)
            {
                newCSS.position = PositionInfo.ToVector2();
            }

            if (BranchInfos != null)
            {
                newCSS.branches = BranchInfos.Select(x => x.ToCutsceneBranch(gameData, assetProvider)).ToList();
            }
            if (DialogOptionInfos != null)
            {
                newCSS.dialogOptions = DialogOptionInfos.Select(x => x.ToCutsceneDialogOption(gameData, assetProvider)).ToList();
            }

            return(newCSS);
        }
Beispiel #3
0
        public AbilityStepSubDefinition ToAbilityStep(GameData gameData, AssetProvider assetProvider)
        {
            if (gameData == null)
            {
                throw new ArgumentNullException(nameof(gameData));
            }
            if (assetProvider == null)
            {
                throw new ArgumentNullException(nameof(assetProvider));
            }

            var newDef = new AbilityStepSubDefinition();

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

            newDef.energyDefinition  = gameData.Energy.Get(EnergyDefinitionID);
            newDef.ailmentDefinition = gameData.Ailments.Get(AilmentDefinitionID);
            newDef.energyDefinition  = gameData.Energy.Get(EnergyDefinitionID);

            if (AudioKlipInfo != null)
            {
                newDef.audioKlip = AudioKlipInfo.ToAudioKlip(assetProvider);
            }
            if (TokenConditionSetInfo != null)
            {
                newDef.tokenConditionSet = TokenConditionSetInfo.ToTokenConditionSet(gameData);
            }

            if (TokenDefinitionIDs != null)
            {
                newDef.tokenDefinitions = TokenDefinitionIDs.Select(x => gameData.Tokens.Get(x)).ToList();
            }

            return(newDef);
        }