Esempio n. 1
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Item != 0)
            {
                hash ^= Item.GetHashCode();
            }
            if (Stardust != false)
            {
                hash ^= Stardust.GetHashCode();
            }
            if (Pokecoin != false)
            {
                hash ^= Pokecoin.GetHashCode();
            }
            if (PokemonCandy != 0)
            {
                hash ^= PokemonCandy.GetHashCode();
            }
            if (Count != 0)
            {
                hash ^= Count.GetHashCode();
            }
            return(hash);
        }
Esempio n. 2
0
 public override void AddRecipes()
 {
     Nebula.AddRecipes(this);
     Solar.AddRecipes(this);
     Stardust.AddRecipes(this);
     Vortex.AddRecipes(this);
 }
Esempio n. 3
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Item != 0)
            {
                hash ^= Item.GetHashCode();
            }
            if (Stardust != false)
            {
                hash ^= Stardust.GetHashCode();
            }
            if (Pokecoin != false)
            {
                hash ^= Pokecoin.GetHashCode();
            }
            if (PokemonCandy != 0)
            {
                hash ^= PokemonCandy.GetHashCode();
            }
            if (Count != 0)
            {
                hash ^= Count.GetHashCode();
            }
            if (Experience != false)
            {
                hash ^= Experience.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
 private void OnTriggerEnter2D(Collider2D collision)
 {
     if (collision.tag == Stardust.STARDUST_TAG)
     {
         Stardust dust = collision.GetComponent <Stardust>();
         m_StardustCounter.IncreaseStardustCount(dust.value);
         dust.GetComponent <ParticleSystem>().Stop();
     }
 }
Esempio n. 5
0
 private void SpawnStardust()
 {
     if (canBeDestroyedByPlayer)
     {
         GameObject stardustObject = Instantiate(m_StardustEffect, this.transform.position, m_StardustEffect.transform.rotation, this.transform.parent);
         Stardust   stardust       = stardustObject.GetComponent <Stardust>();
         stardust.value = this.pointValue;
     }
 }
Esempio n. 6
0
        public override int GetHashCode()
        {
            int hash = 1;

            hash ^= items_.GetHashCode();
            hash ^= avatarItems_.GetHashCode();
            hash ^= eggPokemon_.GetHashCode();
            hash ^= pokemon_.GetHashCode();
            hash ^= pokeCandy_.GetHashCode();
            if (Stardust != 0)
            {
                hash ^= Stardust.GetHashCode();
            }
            if (Pokecoins != 0)
            {
                hash ^= Pokecoins.GetHashCode();
            }
            return(hash);
        }
        public override int GetHashCode()
        {
            int hash = 1;

            if (Type != 0)
            {
                hash ^= Type.GetHashCode();
            }
            if (Exp != 0)
            {
                hash ^= Exp.GetHashCode();
            }
            if (item_ != null)
            {
                hash ^= Item.GetHashCode();
            }
            if (Stardust != 0)
            {
                hash ^= Stardust.GetHashCode();
            }
            if (candy_ != null)
            {
                hash ^= Candy.GetHashCode();
            }
            if (AvatarTemplateId.Length != 0)
            {
                hash ^= AvatarTemplateId.GetHashCode();
            }
            if (QuestTemplateId.Length != 0)
            {
                hash ^= QuestTemplateId.GetHashCode();
            }
            if (pokemonEncounter_ != null)
            {
                hash ^= PokemonEncounter.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Esempio n. 8
0
        public override int GetHashCode()
        {
            int hash = 1;

            hash ^= items_.GetHashCode();
            hash ^= avatarItems_.GetHashCode();
            hash ^= eggPokemon_.GetHashCode();
            hash ^= pokemon_.GetHashCode();
            hash ^= pokeCandy_.GetHashCode();
            if (Stardust != 0)
            {
                hash ^= Stardust.GetHashCode();
            }
            if (Pokecoins != 0)
            {
                hash ^= Pokecoins.GetHashCode();
            }
            hash ^= badges_.GetHashCode();
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Esempio n. 9
0
    // Start is called before the first frame update
    void Start()
    {
        text = GetComponent <TextMeshProUGUI>();

        stardust = new Stardust();
    }
Esempio n. 10
0
        public static Card ToCardEvent(this string str)
        {
            Card ret;

            //First character indicates stage

            GameStage stage = (GameStage)int.Parse("" + str[0]);

            //Second character indicates subclass
            switch (str[1])
            {
            case 'a':
                //format: 'Stage''a''CrewCost''DayCost''Reward'
                ret = new AbandonedShip
                      (
                    stage,
                    Convert.ToInt32("" + str[2], 16),
                    int.Parse("" + str[3]),
                    Convert.ToInt32("" + str[4], 16)
                      );
                break;

            case 'A':
                //format: 'Stage''A''MinimumCrew''DayCost''Wares.Count'('Ware')+
                List <Ware> stationWares = new List <Ware>();
                int         wareCount    = int.Parse("" + str[4]);
                for (int i = 0; i < wareCount; ++i)
                {
                    stationWares.Add((Ware)(int.Parse("" + str[i + 5])));
                }
                ret = new AbandonedStation
                      (
                    stage,
                    Convert.ToInt32("" + str[2], 16),
                    int.Parse("" + str[3]),
                    stationWares
                      );
                break;

            case 'm':
                //format: 'Stage''m''Projectiles.Count'('Projectile','Direction')+
                List <(Projectile, Direction)> projectiles = new List <(Projectile, Direction)>();
                int projectileCount = int.Parse("" + str[2]);
                for (int i = 0; i < projectileCount; ++i)
                {
                    projectiles.Add(((Projectile)(int.Parse("" + str[3 + 2 * i])), (Direction)int.Parse("" + str[4 + 2 * i])));
                }
                ret = new MeteorShower(stage, projectiles);
                break;

            case 'y':
                //format: 'Stage''y''Firepower''DayCost''Reward''Penalty.Projectiles.Count'('Projectile','Direction')+
                List <(Projectile, Direction)> pirateProjectiles = new List <(Projectile, Direction)>();
                int pirateProjectileCount = int.Parse("" + str[5]);
                for (int i = 0; i < pirateProjectileCount; ++i)
                {
                    pirateProjectiles.Add(((Projectile)(int.Parse("" + str[6 + 2 * i])), (Direction)int.Parse("" + str[7 + 2 * i])));
                }
                ret = new Pirates
                      (
                    stage,
                    Convert.ToInt32("" + str[2], 16),
                    int.Parse("" + str[3]),
                    pirateProjectiles,
                    Convert.ToInt32("" + str[4], 16)
                      );
                break;

            case 'd':
                //format: 'Stage''d''Firepower''DayCost''Reward.Count'('Ware')+'Penalty'
                List <Ware> smugglerWares     = new List <Ware>();
                int         smugglerWareCount = int.Parse("" + str[4]);
                for (int i = 0; i < smugglerWareCount; ++i)
                {
                    smugglerWares.Add((Ware)int.Parse("" + str[5 + i]));
                }
                ret = new Smugglers
                      (
                    stage,
                    Convert.ToInt32("" + str[2], 16),
                    int.Parse("" + str[3]),
                    int.Parse("" + str[5 + smugglerWareCount]),
                    smugglerWares
                      );
                break;

            case 'S':
                //format: 'Stage''S''Firepower''DayCost''Reward''Penalty'
                ret = new Slavers
                      (
                    stage,
                    Convert.ToInt32("" + str[2], 16),
                    int.Parse("" + str[3]),
                    int.Parse("" + str[5]),
                    Convert.ToInt32("" + str[4], 16)
                      );
                break;

            case 'o':
                //format: 'Stage''o'
                ret = new OpenSpace(stage);
                break;

            case 'p':
                //format: 'Stage''p'
                ret = new Pandemic(stage);
                break;

            case 'g':
                //format: 'Stage''g'
                ret = new Sabotage(stage);
                break;

            case 'P':
                //format: 'Stage''P''DayCost''Offers.Count'('offer.count'('Ware')+)+
                List <List <Ware> > offers = new List <List <Ware> >();
                int offerCount             = int.Parse("" + str[3]);
                int index = 0;
                for (int i = 0; i < offerCount; ++i)
                {
                    int         offerWareCount = int.Parse("" + str[4 + index]);
                    List <Ware> offer          = new List <Ware>();
                    for (int j = 0; j < offerWareCount; ++j)
                    {
                        offer.Add((Ware)int.Parse("" + str[5 + index + j]));
                    }
                    offers.Add(offer);
                    index += offerWareCount + 1;
                }
                ret = new Planets
                      (
                    stage,
                    int.Parse("" + str[2]),
                    offers
                      );
                break;

            case 's':
                //format: 'Stage''s'
                ret = new Stardust(stage);
                break;

            case 'w':
                //format: 'Stage''w''Event1.Attribute''Event1.PenaltyType''Event1.Penalty'
                //                  'Event2.Attribute''Event2.PenaltyType''Event2.Penalty"
                //                  'Event3.Attribute''Event3.PenaltyType''Event3.Penalty.Projectiles.Count'('Projectile','Direction')+
                WarzoneEvent <int> event1 = new WarzoneEvent <int>
                                            (
                    (CardCheckAttribute)int.Parse("" + str[2]),
                    (CardPenalty)int.Parse("" + str[3]),
                    int.Parse("" + str[4])
                                            );
                WarzoneEvent <int> event2 = new WarzoneEvent <int>
                                            (
                    (CardCheckAttribute)int.Parse("" + str[5]),
                    (CardPenalty)int.Parse("" + str[6]),
                    int.Parse("" + str[7])
                                            );
                List <(Projectile, Direction)> event3Projectiles = new List <(Projectile, Direction)>();
                int event3ProjectilesCount = int.Parse("" + str[10]);
                for (int i = 0; i < event3ProjectilesCount; ++i)
                {
                    event3Projectiles.Add(((Projectile)int.Parse("" + str[11 + 2 * i]), (Direction)int.Parse("" + str[12 + 2 * i])));
                }
                WarzoneEvent <List <(Projectile, Direction)> > event3 = new WarzoneEvent <List <(Projectile, Direction)> >
                                                                        (
                    (CardCheckAttribute)int.Parse("" + str[8]),
                    (CardPenalty)int.Parse("" + str[9]),
                    event3Projectiles
                                                                        );
                ret = new Warzone(stage, event1, event2, event3);
                break;

            default:
                throw new InvalidCastException("Unrecognized CardEvent type character");
            }

            return(ret);
        }
Esempio n. 11
0
 public SampleController(Stardust.Interstellar.IRuntime runtime)
     : base(runtime)
 {
 }