示例#1
0
        public override void EncounterResult(bool action1Selected)
        {
            if (action1Selected)
            {
                int roll = Random.Next(1, 5);

                string message = "They find no way to help, and wish you good luck.";
                switch (roll)
                {
                case 1:
                    roll              = Random.Next(1, 10);
                    message           = string.Format("Excellent, scanner range improved by {0}%!", roll);
                    Player.LongRange += (int)(Player.LongRange * roll / 100);
                    break;

                case 2:
                    roll              = Random.Next(9, 26);
                    message           = string.Format("Excellent, scanner range improved by {0}%!", roll);
                    Player.LongRange += (int)(Player.LongRange * roll / 100);
                    break;

                case 3:
                    roll = Random.Next(1, 10);
                    if (roll == 7)
                    {
                        message           = "Through and unfortunate accident, the scanner array is damaged, range reduced to 80%!!";
                        Player.LongRange -= (int)(Player.LongRange * 0.80);
                    }
                    break;

                case 4:
                    roll = Random.Next(1, 10);
                    if (roll == 10)
                    {
                        message       = "The entire crew has been exposed to an alien deseases and the quarantine failed.\r\nThe entire crew eventually dies.\r\nYou’ve failed and human's are extinct.";
                        Game1.Failure = true;
                    }
                    break;

                case 5:
                    roll                = Random.Next(1, 9);
                    message             = string.Format("Engine's improved, speed increased by {0}%!", roll);
                    Player.PlayerSpeed += (int)(Player.PlayerSpeed * roll / 100);
                    break;
                }
                FadeMessageManager.Show(message);
            }

            EncounterManager.EncounterActive = false;

            LongRangeScanned = true;

            TextureNames textureName = (TextureNames)Random.Next((int)TextureNames.Empty1, (int)TextureNames.Empty4);
            TextureLink  textureLink = TextureManager.Textures[textureName];

            BaseSprite.TintColor = Color.Gray;

            Encounter = false;
        }
        public SpaceTile(Vector2 worldLocation)
        {
            TextureNames textureName = (TextureNames)Random.Next((int)TextureNames.Unknown1, (int)TextureNames.Unknown6);
            TextureLink  textureLink = TextureManager.Textures[textureName];

            BaseSprite = new Sprite(worldLocation,
                                    textureLink.SpriteSheet,
                                    textureLink.SourceRectangle,
                                    Vector2.Zero);

            BaseSprite.AnimateWhenStopped = true;
            BaseSprite.CollisionRadius    = EncounterRange;

            IsStar = false;
        }
        public EarthTile(Vector2 worldLocation)
        {
            TextureLink textureLink = TextureManager.Textures[TextureNames.Earth1];

            BaseSprite = new Sprite(worldLocation,
                                    textureLink.SpriteSheet,
                                    textureLink.SourceRectangle,
                                    Vector2.Zero);

            BaseSprite.AnimateWhenStopped = true;
            BaseSprite.CollisionRadius    = EncounterRange;

            Encounter        = false;
            LongRangeScanned = true;

            tester = new HelpfulScanners(worldLocation);
        }
        public virtual void LongRangeScan()
        {
            if (LongRangeScanned == false)
            {
                LongRangeScanned = true;

                TextureNames textureName = (TextureNames)Random.Next((int)TextureNames.Empty1, (int)TextureNames.Empty4);
                TextureLink  textureLink = TextureManager.Textures[textureName];

                BaseSprite = new Sprite(BaseSprite.WorldLocation,
                                        textureLink.SpriteSheet,
                                        textureLink.SourceRectangle,
                                        Vector2.Zero);

                BaseSprite.AnimateWhenStopped = true;
                BaseSprite.CollisionRadius    = EncounterRange;
            }
        }
        public virtual void EncounterResult(bool action1Selected)
        {
            EncounterManager.EncounterActive = false;

            LongRangeScanned = true;

            TextureNames textureName = (TextureNames)Random.Next((int)TextureNames.Empty1, (int)TextureNames.Empty4);
            TextureLink  textureLink = TextureManager.Textures[textureName];

            BaseSprite = new Sprite(BaseSprite.WorldLocation,
                                    textureLink.SpriteSheet,
                                    textureLink.SourceRectangle,
                                    Vector2.Zero);

            BaseSprite.AnimateWhenStopped = true;
            BaseSprite.CollisionRadius    = 1;

            Encounter = false;
        }
示例#6
0
        public override void LongRangeScan()
        {
            if (LongRangeScanned == false)
            {
                SoundManager.CivAlert.Play();

                LongRangeScanned = true;

                TextureNames textureName = (TextureNames)Random.Next((int)TextureNames.Star1, (int)TextureNames.Star7);
                TextureLink  textureLink = TextureManager.Textures[textureName];

                BaseSprite = new Sprite(BaseSprite.WorldLocation,
                                        textureLink.SpriteSheet,
                                        textureLink.SourceRectangle,
                                        Vector2.Zero);

                Color tint = new Color(Random.Next(1, 254), Random.Next(1, 254), Random.Next(1, 254));
                BaseSprite.TintColor = tint;

                BaseSprite.AnimateWhenStopped = true;
                BaseSprite.CollisionRadius    = 1;
            }
        }