Exemplo n.º 1
0
        protected override void OnUpdate(SAMTime gameTime, InputState istate)
        {
#if DEBUG
            DebugDisp.IsEnabled = DebugSettings.Get("DebugTextDisplay");
            DebugDisp.Scale     = 0.75f;

            //if (MonoSAMGame.IsDesktop())
            //{
            //	if (istate.IsKeyExclusiveJustDown(SKeys.R))
            //	{
            //		var xcfg = XConfigFile.LoadFromString(System.IO.File.ReadAllText(@"F:\Symlinks\GridDominance\Data\presets\green_gas.xconf"));
            //		var pcfg = ParticleEmitterConfig.ParticleEmitterConfigBuilder.LoadFromXConfig(xcfg);
            //		_banner.CreateEntities(pcfg);
            //	}
            //}
#endif

            if (!MainGame.IsShaderless())
            {
                if (_effectsEnabledCache != MainGame.Inst.Profile.EffectsEnabled)
                {
                    _effectsEnabledCache = MainGame.Inst.Profile.EffectsEnabled;

                    if (MainGame.Inst.Profile.EffectsEnabled)
                    {
                        _banner.CreateEntities(ParticlePresets.GetConfigLetterGreenGas());
                    }
                    else
                    {
                        _banner.RemoveEntities();
                    }
                }
            }
        }
Exemplo n.º 2
0
        private void Initialize()
        {
#if DEBUG
            DebugUtils.CreateShortcuts(this);
            DebugDisp = DebugUtils.CreateDisplay(this);
#endif
            AddAgent(new ExitAgent(this));

            OverworldNode[] nodes =
            {
                new OverworldNode_Tutorial(this, FPoint.Zero),
                new OverworldNode_W1(this,       FPoint.Zero),
                new OverworldNode_W2(this,       FPoint.Zero),
                new OverworldNode_W3(this,       FPoint.Zero),
                new OverworldNode_W4(this,       FPoint.Zero),
                new OverworldNode_MP(this,       FPoint.Zero),
            };

            foreach (var node in nodes)
            {
                Entities.AddEntity(node);
            }

            AddAgent(ScrollAgent = new OverworldScrollAgent(this, nodes));

            _banner.TargetRect          = new FRectangle(0 * GDConstants.TILE_WIDTH, 0.5f * GDConstants.TILE_WIDTH, 16 * GDConstants.TILE_WIDTH, 4 * GDConstants.TILE_WIDTH).AsDeflated(0.25f * GDConstants.TILE_WIDTH);
            _banner.Text                = GDConstants.LOGO_STRING;
            _banner.UseCPUParticles     = false;
            _banner.AnimationTime       = 4f;
            _banner.AnimationStartDelay = 1f;
            _banner.CreateEntities(ParticlePresets.GetConfigLetterGreenGas());
        }
Exemplo n.º 3
0
        private void Initialize()
        {
#if DEBUG
            DebugUtils.CreateShortcuts(this);
            DebugDisp = DebugUtils.CreateDisplay(this);
#endif

            _banner1.TargetRect          = new FRectangle(0, 2.5f, 16, 2).AsDeflated(0.25f).InReferenceRaster(1f / GDConstants.TILE_WIDTH);
            _banner1.Text                = L10N.T(L10NImpl.STR_ENDGAME_1);
            _banner1.UseCPUParticles     = false;
            _banner1.AnimationTime       = 4f;
            _banner1.AnimationStartDelay = 5f;
            _banner1.CreateEntities(ParticlePresets.GetConfigLetterFlickerFire());

            _banner2.TargetRect          = new FRectangle(0, 5.5f, 16, 2).AsDeflated(0.25f).InReferenceRaster(1f / GDConstants.TILE_WIDTH);
            _banner2.Text                = L10N.T(L10NImpl.STR_ENDGAME_2);
            _banner2.UseCPUParticles     = false;
            _banner2.AnimationTime       = 4f;
            _banner2.AnimationStartDelay = 9f;
            _banner2.CreateEntities(ParticlePresets.GetConfigLetterFlickerFire());

            Entities.AddEntity(new MouseAreaEntity(this, new FPoint(VIEW_WIDTH / 2f, VIEW_HEIGHT / 2f), new FSize(VIEW_WIDTH * 2, VIEW_HEIGHT * 2), 0)
            {
                Click = LeaveScreen
            });
        }
Exemplo n.º 4
0
        private void Initialize()
        {
#if DEBUG
            DebugUtils.CreateShortcuts(this);
            DebugDisp = DebugUtils.CreateDisplay(this);
#endif

            if (!MonoSAMGame.IsIOS())
            {
                AddAgent(new ExitAgent());
            }

            List <OverworldNode> nodesList = new List <OverworldNode>();

            nodesList.Add(new OverworldNode_Tutorial(this, FPoint.Zero));
            nodesList.Add(new OverworldNode_W1(this, FPoint.Zero));
            nodesList.Add(new OverworldNode_W2(this, FPoint.Zero));
            nodesList.Add(new OverworldNode_W3(this, FPoint.Zero));
            nodesList.Add(new OverworldNode_W4(this, FPoint.Zero));
            if (MainGame.Flavor != GDFlavor.FREE && MainGame.Flavor != GDFlavor.FULL_NOMP && MainGame.Flavor != GDFlavor.IAB_NOMP)
            {
                nodesList.Add(new OverworldNode_MP(this, FPoint.Zero));
            }
            if (MainGame.Flavor != GDFlavor.FREE)
            {
                nodesList.Add(new OverworldNode_SCCM(this, FPoint.Zero));
            }

            foreach (var node in nodesList)
            {
                Entities.AddEntity(node);
            }

            AddAgent(ScrollAgent = new OverworldScrollAgent(nodesList.ToArray()));

            _banner.TargetRect          = new FRectangle(0 * GDConstants.TILE_WIDTH, 0.5f * GDConstants.TILE_WIDTH, 16 * GDConstants.TILE_WIDTH, 4 * GDConstants.TILE_WIDTH).AsDeflated(0.25f * GDConstants.TILE_WIDTH);
            _banner.Text                = GDConstants.LOGO_STRING;
            _banner.UseCPUParticles     = false;
            _banner.AnimationTime       = 4f;
            _banner.AnimationStartDelay = 1f;

            if (!MainGame.IsShaderless())
            {
                _banner.CreateEntities(ParticlePresets.GetConfigLetterGreenGas());
            }
        }
        private void Initialize()
        {
#if DEBUG
            DebugUtils.CreateShortcuts(this);
            DebugDisp = DebugUtils.CreateDisplay(this);
#endif

#if !__IOS__
            AddAgent(new ExitAgent(this));
#endif

            List <OverworldNode> nodesList = new List <OverworldNode>();

            nodesList.Add(new OverworldNode_Tutorial(this, FPoint.Zero));
            nodesList.Add(new OverworldNode_W1(this, FPoint.Zero));
            nodesList.Add(new OverworldNode_W2(this, FPoint.Zero));
            nodesList.Add(new OverworldNode_W3(this, FPoint.Zero));
            nodesList.Add(new OverworldNode_W4(this, FPoint.Zero));
            if (GDConstants.FLAVOR != GDFlavor.FREE && GDConstants.FLAVOR != GDFlavor.FULL_NOMP)
            {
                nodesList.Add(new OverworldNode_MP(this, FPoint.Zero));
            }

            foreach (var node in nodesList)
            {
                Entities.AddEntity(node);
            }

            AddAgent(ScrollAgent = new OverworldScrollAgent(this, nodesList.ToArray()));

            _banner.TargetRect          = new FRectangle(0 * GDConstants.TILE_WIDTH, 0.5f * GDConstants.TILE_WIDTH, 16 * GDConstants.TILE_WIDTH, 4 * GDConstants.TILE_WIDTH).AsDeflated(0.25f * GDConstants.TILE_WIDTH);
            _banner.Text                = GDConstants.LOGO_STRING;
            _banner.UseCPUParticles     = false;
            _banner.AnimationTime       = 4f;
            _banner.AnimationStartDelay = 1f;

#if !GD_SHADERLESS
            _banner.CreateEntities(ParticlePresets.GetConfigLetterGreenGas());
#endif
        }
        private void AddParticles()
        {
            var scrn = HUD.Screen;

            var path = VectorPathBuilder
                       .Start()
                       .MoveTo(scrn.TranslateHUDToGameCoordinates(-WIDTH / 2f, -HEIGHT / 2f))
                       .LineTo(scrn.TranslateHUDToGameCoordinates(-WIDTH / 2f, +HEIGHT / 2f))
                       .LineTo(scrn.TranslateHUDToGameCoordinates(+WIDTH / 2f, +HEIGHT / 2f))
                       .LineTo(scrn.TranslateHUDToGameCoordinates(+WIDTH / 2f, -HEIGHT / 2f))
                       .LineTo(scrn.TranslateHUDToGameCoordinates(-WIDTH / 2f, -HEIGHT / 2f))
                       .Build();

#if !GD_SHADERLESS
            var cfg = ParticlePresets.GetConfigBubbleHighlight().Build(Textures.TexParticle, 2f, 3f);

            _emitter = new PathGPUParticleEmitter(scrn, scrn.MapViewportCenter, path, cfg, GDConstants.ORDER_WORLD_SUPEREFFECTS);
            _emitter.AlphaAppearTime = 5f;
            _emitter.FastForward();

            HUD.Screen.Entities.AddEntity(_emitter);
#endif
        }