Exemplo n.º 1
0
        /// <summary>
        ///     Shrinks the data arrays in the RpgDataRegistry if they have null references
        /// </summary>
        private static void CleanNullReferencesFromRpgRegistry()
        {
            // Find the RpgDataRegistry
            RpgDataRegistry registry = RpgDataAssetUtility.FindRpgDataRegistry();

            // Clean the arrays in the registry of null references
            registry.CleanMissingReferences();
        }
        private static void CreateSkillStatAsset()
        {
            SkillStat newData = CustomDataAssetUtility.CreateAndReturnDataAsset <SkillStat>();

            newData.Init();

            RpgDataRegistry registry = RpgDataAssetUtility.FindRpgDataRegistry();

            RpgRegistryUtility.AdderOfSkillStat newAdder;
            newAdder.skillStat = newData;
            registry.AddRpgDataObject(newAdder);
        }
        private static void CreateAbilityAsset()
        {
            Ability newData = CustomDataAssetUtility.CreateAndReturnDataAsset <Ability>();

            newData.Init();

            RpgDataRegistry registry = RpgDataAssetUtility.FindRpgDataRegistry();

            RpgRegistryUtility.AdderOfAbility newAdder;
            newAdder.ability = newData;
            registry.AddRpgDataObject(newAdder);
        }
        private static void CreateXpProgressorAsset()
        {
            XpProgressor newData = CustomDataAssetUtility.CreateAndReturnDataAsset <XpProgressor>();

            newData.Init();

            RpgDataRegistry registry = RpgDataAssetUtility.FindRpgDataRegistry();

            RpgRegistryUtility.AdderOfXpProgressor newAdder;
            newAdder.xpProgressor = newData;
            registry.AddRpgDataObject(newAdder);
        }