Esempio n. 1
0
        internal static PlayerData newPlayerData(this MemoryCard memoryCard)
        {
            PlayerData playerData = memoryCard.insert <PlayerData>();

            playerData.botLevel          = 0;
            playerData.deviceName        = "deviceName";
            playerData.maxBotLevel       = 0;
            playerData.maxBotRarity      = 0;
            playerData.maxSpaceshipLevel = 10;
            playerData.modelVersion      = 0;
            playerData.music             = true;
            playerData.name          = "name";
            playerData.points        = 10000;
            playerData.premiumPoints = 256;
            playerData.sound         = true;

            MothershipData mothershipData = memoryCard.newMothershipData();

            playerData.mothership = mothershipData;

            Element.Type[] elementTypes =
            {
                Element.Type.water,
                Element.Type.fire,
                Element.Type.ice,
                Element.Type.wind
            };

            for (int i = 0; i < 4; i++)
            {
                MothershipSlotData mothershipSlotData = memoryCard.newMothershipSlotData();
                mothershipSlotData.index = i;

                SpaceshipData spaceshipData = memoryCard.newSpaceshipData(Spaceship.Rarity.common,
                                                                          Spaceship.randomColorFor(elementTypes[i]));
                mothershipSlotData.spaceship = spaceshipData;
                mothershipData.addToSlots(mothershipSlotData);
            }

            return(playerData);
        }
Esempio n. 2
0
        internal static MothershipData newMothershipData(this MemoryCard memoryCard)
        {
            MothershipData mothershipData = memoryCard.insert <MothershipData>();

            return(mothershipData);
        }