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();
                    }
                }
            }
        }
Exemple #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());
        }
        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
        }