Ejemplo n.º 1
0
        // Static setup methods

        /// <summary> Creates a new ItemDescription that can be used by the game. </summary>
        public static ItemDescription CreateItemDescription(string sName, string sDesc, string sDisplayImage, ContentManager xContent, string sShadow = "")
        {
            string sEntry = sName.Replace(" ", "");

            ItemDescription xDesc = new ItemDescription()
            {
                sFullName                 = sName,
                sDescription              = sDesc,
                sNameLibraryHandle        = sEntry + "_Name",
                sDescriptionLibraryHandle = sEntry + "_Description",
                sCategory                 = "",
                iInternalLevel            = 1,
                iValue = 1,
                enType = ModLibrary.ItemTypesNext
            };

            ItemCodex.denxLoadedDescriptions[xDesc.enType] = xDesc;
            ModLibrary.ItemDetails.Add(xDesc.enType, new ModItemData(xDesc.enType));

            Ui.AddMiscText("Items", xDesc.sNameLibraryHandle, sName, MiscTextTypes.GenericItemName);
            Ui.AddMiscText("Items", xDesc.sDescriptionLibraryHandle, sDesc, MiscTextTypes.GenericItemDescription);

            xDesc.SetTextures(sDisplayImage, xContent, sShadow);

            return(xDesc);
        }
Ejemplo n.º 2
0
        // Static setup methods

        /// <summary> Creates a new EnemyDescription that can be used by the game. </summary>
        public static EnemyDescription CreateEnemyDescription(string sName, int iLevel, int iBaseHealth)
        {
            string sBaseEntryName = sName.Replace(" ", "");

            EnemyDescription xDesc = new EnemyDescription(ModLibrary.EnemyTypesNext, sBaseEntryName + "_Name", iLevel, iBaseHealth)
            {
                sOnDeathSound = "",
                sOnHitSound   = "",
                sFullName     = sName
            };

            EnemyCodex.denxDescriptionDict[xDesc.enType] = xDesc;
            ModLibrary.EnemyDetails.Add(xDesc.enType, new ModEnemyData(xDesc.enType));

            Ui.AddMiscText("Enemies", sBaseEntryName + "_Name", sName);

            return(xDesc);
        }