fuzzybinary / AngelXNA

AngelXNA is a port of the Angel C++ game prototyping engine to Microsoft's XNA platform. It offers simple structures for prototyping game ideas for any platform XNA supports.

Clone this repository (size: 4.7 MB): HTTPS / SSH
$ hg clone http://bitbucket.org/fuzzybinary/angelxna/
commit 97: 5c8b658d7b04
parent 96: c8e65a959bc4
branch: default
Adding the ability to turn simulation on and off from the editor.
jeffw
7 weeks ago

Changed (Δ2.5 KB):

raw changeset »

AngelXNA/AI/Sentient.cs (2 lines added, 2 lines removed)

AngelXNA/Actors/Actor.cs (42 lines added, 21 lines removed)

AngelXNA/Actors/GridActor.cs (1 lines added, 1 lines removed)

AngelXNA/Actors/ParticleActor.cs (1 lines added, 1 lines removed)

AngelXNA/Actors/TextActor.cs (1 lines added, 1 lines removed)

AngelXNA/AngelComponent.cs (1 lines added, 1 lines removed)

AngelXNA/Editor/EditorForm.Designer.cs (33 lines added, 8 lines removed)

AngelXNA/Editor/EditorForm.cs (11 lines added, 0 lines removed)

AngelXNA/Editor/EditorForm.resx (0 lines added, 3 lines removed)

AngelXNA/Infrastructure/Camera.cs (2 lines added, 2 lines removed)

AngelXNA/Infrastructure/GameManager.cs (1 lines added, 1 lines removed)

AngelXNA/Infrastructure/Renderable.cs (1 lines added, 1 lines removed)

AngelXNA/Infrastructure/World.cs (6 lines added, 5 lines removed)

AngelXNA/Messaging/Switchboard.cs (0 lines added, 1 lines removed)

IntroGame/DemoGameManager.cs (2 lines added, 2 lines removed)

Up to file-list AngelXNA/AI/Sentient.cs:

@@ -31,9 +31,9 @@ namespace AngelXNA.AI
31
31
            base.Update(time);
32
32
        }
33
33
34
        public override void Render(Camera aCamera, GraphicsDevice aDevice, SpriteBatch aBatch)
34
        public override void Render(GameTime aTime, Camera aCamera, GraphicsDevice aDevice, SpriteBatch aBatch)
35
35
        {
36
            base.Render(aCamera, aDevice, aBatch);
36
            base.Render(aTime, aCamera, aDevice, aBatch);
37
37
            _pathFinder.Render();
38
38
            _brain.Render();
39
39
        }

Up to file-list AngelXNA/Actors/Actor.cs:

@@ -46,13 +46,11 @@ namespace AngelXNA.Actors
46
46
        protected static Texture2D s_defaultTexture;
47
47
48
48
        private int _spriteNumFrames = 0;
49
	    private float _spriteFrameDelay = 0.0f;
49
        private float _spriteAnimDelay;
50
50
	    private float _spriteCurrentFrameDelay;
51
51
        private List<string> _tags = new List<string>();
52
52
	    private SpriteAnimationType _spriteAnimType;
53
	    private int _spriteAnimStartFrame;
54
	    private int _spriteAnimEndFrame;
55
	    private int _spriteAnimDirection;
53
        private int _spriteAnimDirection;
56
54
        private string _currentAnimName;
57
55
        private string _name;
58
56
        private string _actorDefinition;
@@ -141,11 +139,32 @@ namespace AngelXNA.Actors
141
139
            }
142
140
        }
143
141
144
        public bool SpriteAnimPlaying
142
        [ConsoleProperty]
143
        public SpriteAnimationType SpriteAnimType
145
144
        {
146
            get { return _spriteFrameDelay > 0; }
145
            get { return _spriteAnimType; }
146
            set
147
            {
148
                PlaySpriteAnimation(_spriteAnimDelay, value);
149
            }
147
150
        }
148
151
152
        [ConsoleProperty]
153
        public float SpriteAnimSpeed 
154
        {
155
            get { return _spriteAnimDelay; }
156
            set
157
            {
158
                PlaySpriteAnimation(value, _spriteAnimType);
159
            }
160
        }
161
162
        [ConsoleProperty]
163
        public int SpriteAnimStartFrame { get; set; }
164
165
        [ConsoleProperty]
166
        public int SpriteAnimEndFrame { get; set; }
167
149
168
        public Actor()
150
169
        {
151
170
            Color = Color.White;
@@ -267,8 +286,10 @@ namespace AngelXNA.Actors
267
286
            {
268
287
                _spriteTextures[i] = null;
269
288
            }
289
            
270
290
            _spriteAnimType = SpriteAnimationType.None;
271
            _spriteFrameDelay = 0.0f;
291
            _spriteAnimDelay = 0.0f;
292
272
293
            _spriteCurrentFrame = 0;
273
294
        }
274
295
@@ -286,7 +307,7 @@ namespace AngelXNA.Actors
286
307
287
308
        public void PlaySpriteAnimation(float afDelay, SpriteAnimationType aeType)
288
309
        {
289
            PlaySpriteAnimation(afDelay, aeType, -1, -1);
310
            PlaySpriteAnimation(afDelay, aeType, -1, _spriteNumFrames - 1);
290
311
        }
291
312
292
313
        public void PlaySpriteAnimation(float afDelay, SpriteAnimationType aeType, int aiStartFrame, int aiEndFrame)
@@ -301,10 +322,10 @@ namespace AngelXNA.Actors
301
322
302
323
            _spriteAnimDirection = aiStartFrame > aiEndFrame ? -1 : 1;
303
324
304
            _spriteCurrentFrameDelay = _spriteFrameDelay = afDelay;
325
            _spriteCurrentFrameDelay = _spriteAnimDelay = afDelay;
305
326
            _spriteAnimType = aeType;
306
            _spriteAnimStartFrame = _spriteCurrentFrame = aiStartFrame;
307
            _spriteAnimEndFrame = aiEndFrame;
327
            SpriteAnimStartFrame = _spriteCurrentFrame = aiStartFrame;
328
            SpriteAnimEndFrame = aiEndFrame;
308
329
309
330
            if (asAnimName != null)
310
331
                _currentAnimName = asAnimName;
@@ -388,7 +409,7 @@ namespace AngelXNA.Actors
388
409
        {
389
410
            float dt = (float)aTime.ElapsedGameTime.TotalSeconds;
390
411
391
            if (_spriteFrameDelay > 0.0f)
412
            if (_spriteAnimDelay > 0.0f)
392
413
            {
393
414
                _spriteCurrentFrameDelay -= dt;
394
415
@@ -399,18 +420,18 @@ namespace AngelXNA.Actors
399
420
                        switch(_spriteAnimType)
400
421
                        {
401
422
                            case SpriteAnimationType.Loop:
402
                                if (_spriteCurrentFrame == _spriteAnimEndFrame)
403
                                    _spriteCurrentFrame = _spriteAnimStartFrame;
423
                                if (_spriteCurrentFrame == SpriteAnimEndFrame)
424
                                    _spriteCurrentFrame = SpriteAnimStartFrame;
404
425
                                else
405
426
                                    ++_spriteCurrentFrame;
406
427
                                break;
407
428
                            case SpriteAnimationType.PingPong:
408
429
                                if (_spriteAnimDirection == 1)
409
430
                                {
410
                                    if (_spriteCurrentFrame == _spriteAnimEndFrame)
431
                                    if (_spriteCurrentFrame == SpriteAnimEndFrame)
411
432
                                    {
412
433
                                        _spriteAnimDirection = -1;
413
                                        _spriteCurrentFrame = _spriteAnimEndFrame - 1;
434
                                        _spriteCurrentFrame = SpriteAnimEndFrame - 1;
414
435
                                    }
415
436
                                    else
416
437
                                        ++_spriteCurrentFrame;
@@ -418,10 +439,10 @@ namespace AngelXNA.Actors
418
439
                                }
419
440
                                else
420
441
                                {
421
                                    if (_spriteCurrentFrame == _spriteAnimStartFrame)
442
                                    if (_spriteCurrentFrame == SpriteAnimStartFrame)
422
443
                                    {
423
444
                                        _spriteAnimDirection = 1;
424
                                        _spriteCurrentFrame = _spriteAnimStartFrame + 1;
445
                                        _spriteCurrentFrame = SpriteAnimStartFrame + 1;
425
446
                                    }
426
447
                                    else
427
448
                                    {
@@ -431,7 +452,7 @@ namespace AngelXNA.Actors
431
452
                                break;
432
453
                            case SpriteAnimationType.OneShot:
433
454
                                // If we're done with our one shot and they set an animName, let them know it's done.
434
                                if (_spriteCurrentFrame == _spriteAnimEndFrame)
455
                                if (_spriteCurrentFrame == SpriteAnimEndFrame)
435
456
                                {
436
457
                                    // Needs to get called before callback, in case they start a new animation.
437
458
                                    _spriteAnimType = SpriteAnimationType.None;
@@ -448,7 +469,7 @@ namespace AngelXNA.Actors
448
469
                                break;
449
470
                        }
450
471
451
                        _spriteCurrentFrameDelay += _spriteFrameDelay;
472
                        _spriteCurrentFrameDelay += _spriteAnimDelay;
452
473
                    }
453
474
                }
454
475
            }
@@ -509,7 +530,7 @@ namespace AngelXNA.Actors
509
530
            }
510
531
        }
511
532
512
        public override void Render(Camera aCamera, GraphicsDevice aDevice, SpriteBatch aBatch)
533
        public override void Render(GameTime aTime, Camera aCamera, GraphicsDevice aDevice, SpriteBatch aBatch)
513
534
        {
514
535
            // TODO: Rendering needs refactoring... a LOT.
515
536
            if (s_defaultTexture == null)

Up to file-list AngelXNA/Actors/GridActor.cs:

@@ -41,7 +41,7 @@ namespace AngelXNA.Actors
41
41
            
42
42
        }
43
43
44
        public override void Render(Camera aCamera, GraphicsDevice aDevice, SpriteBatch aBatch)
44
        public override void Render(GameTime aTime, Camera aCamera, GraphicsDevice aDevice, SpriteBatch aBatch)
45
45
        {
46
46
            if (_verts == null)
47
47
            {

Up to file-list AngelXNA/Actors/ParticleActor.cs:

@@ -275,7 +275,7 @@ namespace AngelXNA.Actors
275
275
	        }
276
276
        }
277
277
278
        public override void Render(Camera aCamera, GraphicsDevice aDevice, SpriteBatch aBatch)
278
        public override void Render(GameTime aTime, Camera aCamera, GraphicsDevice aDevice, SpriteBatch aBatch)
279
279
        {
280
280
            if (_particles == null)
281
281
                return;

Up to file-list AngelXNA/Actors/TextActor.cs:

@@ -125,7 +125,7 @@ namespace AngelXNA.Actors
125
125
            TextAlignment = align;
126
126
        }
127
127
128
        public override void Render(Camera aCamera, GraphicsDevice aDevice, SpriteBatch aBatch)
128
        public override void Render(GameTime aTime, Camera aCamera, GraphicsDevice aDevice, SpriteBatch aBatch)
129
129
        {
130
130
            // TODO: FIX ME!!! Doing this just to test text rendering for now.
131
131
            SpriteFont font = FontCache.Instance[Font];

Up to file-list AngelXNA/AngelComponent.cs:

@@ -188,7 +188,7 @@ namespace AngelXNA
188
188
189
189
        public override void Draw(GameTime gameTime)
190
190
        {
191
            World.Instance.Render(GraphicsDevice, _spriteBatch);
191
            World.Instance.Render(gameTime, GraphicsDevice, _spriteBatch);
192
192
193
193
            base.Draw(gameTime);
194
194
        }

Up to file-list AngelXNA/Editor/EditorForm.Designer.cs:

@@ -39,6 +39,8 @@ namespace AngelXNA.Editor
39
39
            this._lbActorDefinitions = new System.Windows.Forms.ListBox();
40
40
            this._tpBaseActors = new System.Windows.Forms.TabPage();
41
41
            this._lbBaseActors = new System.Windows.Forms.ListBox();
42
            this._ddlSimulate = new System.Windows.Forms.ComboBox();
43
            this.label1 = new System.Windows.Forms.Label();
42
44
            this._tcActorDefinitions.SuspendLayout();
43
45
            this._tpTemplates.SuspendLayout();
44
46
            this._tpBaseActors.SuspendLayout();
@@ -46,9 +48,8 @@ namespace AngelXNA.Editor
46
48
            // 
47
49
            // _pgObjProperties
48
50
            // 
49
            this._pgObjProperties.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
50
                        | System.Windows.Forms.AnchorStyles.Right)));
51
            this._pgObjProperties.Location = new System.Drawing.Point(12, 12);
51
            this._pgObjProperties.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
52
            this._pgObjProperties.Location = new System.Drawing.Point(12, 39);
52
53
            this._pgObjProperties.Name = "_pgObjProperties";
53
54
            this._pgObjProperties.Size = new System.Drawing.Size(309, 362);
54
55
            this._pgObjProperties.TabIndex = 0;
@@ -56,7 +57,7 @@ namespace AngelXNA.Editor
56
57
            // 
57
58
            // btnSaveActorDefinition
58
59
            // 
59
            this.btnSaveActorDefinition.Location = new System.Drawing.Point(12, 380);
60
            this.btnSaveActorDefinition.Location = new System.Drawing.Point(12, 407);
60
61
            this.btnSaveActorDefinition.Name = "btnSaveActorDefinition";
61
62
            this.btnSaveActorDefinition.Size = new System.Drawing.Size(131, 23);
62
63
            this.btnSaveActorDefinition.TabIndex = 1;
@@ -67,7 +68,7 @@ namespace AngelXNA.Editor
67
68
            // _lblActorDefs
68
69
            // 
69
70
            this._lblActorDefs.AutoSize = true;
70
            this._lblActorDefs.Location = new System.Drawing.Point(12, 419);
71
            this._lblActorDefs.Location = new System.Drawing.Point(9, 446);
71
72
            this._lblActorDefs.Name = "_lblActorDefs";
72
73
            this._lblActorDefs.Size = new System.Drawing.Size(130, 13);
73
74
            this._lblActorDefs.TabIndex = 3;
@@ -76,7 +77,7 @@ namespace AngelXNA.Editor
76
77
            // _btnAddActor
77
78
            // 
78
79
            this._btnAddActor.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
79
            this._btnAddActor.Location = new System.Drawing.Point(15, 653);
80
            this._btnAddActor.Location = new System.Drawing.Point(15, 679);
80
81
            this._btnAddActor.Name = "_btnAddActor";
81
82
            this._btnAddActor.Size = new System.Drawing.Size(75, 23);
82
83
            this._btnAddActor.TabIndex = 4;
@@ -90,7 +91,7 @@ namespace AngelXNA.Editor
90
91
                        | System.Windows.Forms.AnchorStyles.Right)));
91
92
            this._tcActorDefinitions.Controls.Add(this._tpTemplates);
92
93
            this._tcActorDefinitions.Controls.Add(this._tpBaseActors);
93
            this._tcActorDefinitions.Location = new System.Drawing.Point(15, 435);
94
            this._tcActorDefinitions.Location = new System.Drawing.Point(15, 461);
94
95
            this._tcActorDefinitions.Name = "_tcActorDefinitions";
95
96
            this._tcActorDefinitions.SelectedIndex = 0;
96
97
            this._tcActorDefinitions.Size = new System.Drawing.Size(306, 212);
@@ -136,11 +137,33 @@ namespace AngelXNA.Editor
136
137
            this._lbBaseActors.Size = new System.Drawing.Size(292, 173);
137
138
            this._lbBaseActors.TabIndex = 0;
138
139
            // 
140
            // _ddlSimulate
141
            // 
142
            this._ddlSimulate.FormattingEnabled = true;
143
            this._ddlSimulate.Items.AddRange(new object[] {
144
            "On",
145
            "Off"});
146
            this._ddlSimulate.Location = new System.Drawing.Point(76, 12);
147
            this._ddlSimulate.Name = "_ddlSimulate";
148
            this._ddlSimulate.Size = new System.Drawing.Size(67, 21);
149
            this._ddlSimulate.TabIndex = 6;
150
            // 
151
            // label1
152
            // 
153
            this.label1.AutoSize = true;
154
            this.label1.Location = new System.Drawing.Point(12, 15);
155
            this.label1.Name = "label1";
156
            this.label1.Size = new System.Drawing.Size(58, 13);
157
            this.label1.TabIndex = 7;
158
            this.label1.Text = "Simulation:";
159
            // 
139
160
            // EditorForm
140
161
            // 
141
162
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
142
163
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
143
            this.ClientSize = new System.Drawing.Size(333, 694);
164
            this.ClientSize = new System.Drawing.Size(333, 748);
165
            this.Controls.Add(this.label1);
166
            this.Controls.Add(this._ddlSimulate);
144
167
            this.Controls.Add(this._tcActorDefinitions);
145
168
            this.Controls.Add(this._btnAddActor);
146
169
            this.Controls.Add(this._lblActorDefs);
@@ -168,6 +191,8 @@ namespace AngelXNA.Editor
168
191
        private System.Windows.Forms.ListBox _lbActorDefinitions;
169
192
        private System.Windows.Forms.TabPage _tpBaseActors;
170
193
        private System.Windows.Forms.ListBox _lbBaseActors;
194
        private System.Windows.Forms.ComboBox _ddlSimulate;
195
        private System.Windows.Forms.Label label1;
171
196
    }
172
197
}
173
198

Up to file-list AngelXNA/Editor/EditorForm.cs:

@@ -39,10 +39,21 @@ namespace AngelXNA.Editor
39
39
            this.Disposed += new EventHandler(EditorForm_Disposed);
40
40
            this.Shown += new EventHandler(EditorForm_Shown);
41
41
42
            _ddlSimulate.SelectedItem = World.Instance.IsSimulating ? "On" : "Off";
43
            _ddlSimulate.SelectedIndexChanged += new EventHandler(_ddlSimulate_SelectedIndexChanged);
44
42
45
            RebindActorDefinitions();
43
46
            RebindBaseActors();
44
47
        }
45
48
49
        void _ddlSimulate_SelectedIndexChanged(object sender, EventArgs e)
50
        {
51
            if (_ddlSimulate.SelectedItem == "On")
52
                World.Instance.IsSimulating = true;
53
            else
54
                World.Instance.IsSimulating = false;
55
        }
56
46
57
        public Actor Selected
47
58
        {
48
59
            get { return _selectedObject; }

Up to file-list AngelXNA/Editor/EditorForm.resx:

117
117
  <resheader name="writer">
118
118
    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
119
119
  </resheader>
120
  <metadata name="_pgObjProperties.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
121
    <value>True</value>
122
  </metadata>
123
120
</root>

Up to file-list AngelXNA/Infrastructure/Camera.cs:

@@ -187,8 +187,8 @@ namespace AngelXNA.Infrastructure
187
187
188
188
            return position;
189
189
        }
190
        
191
        public override void Render(Camera aCamera, GraphicsDevice aDevice, SpriteBatch aBatch)
190
191
        public override void Render(GameTime aTime, Camera aCamera, GraphicsDevice aDevice, SpriteBatch aBatch)
192
192
        {
193
193
            
194
194
        }

Up to file-list AngelXNA/Infrastructure/GameManager.cs:

@@ -10,7 +10,7 @@ namespace AngelXNA.Infrastructure
10
10
{
11
11
    public class GameManager : Renderable
12
12
    {
13
        public override void Render(Camera aCamera, GraphicsDevice aDevice, SpriteBatch aBatch) { }
13
        public override void Render(GameTime aTime, Camera aCamera, GraphicsDevice aDevice, SpriteBatch aBatch) { }
14
14
        public override void Update(GameTime aTime) { }
15
15
        public virtual bool IsProtectedFromUnloadAll(Renderable renderable) { return false; }
16
16
    }

Up to file-list AngelXNA/Infrastructure/Renderable.cs:

@@ -32,7 +32,7 @@ namespace AngelXNA.Infrastructure
32
32
	    }
33
33
34
34
        public abstract void Update(GameTime aTime);
35
        public abstract void Render(Camera aCamera, GraphicsDevice aDevice, SpriteBatch aBatch);
35
        public abstract void Render(GameTime aTime, Camera aCamera, GraphicsDevice aDevice, SpriteBatch aBatch);
36
36
37
37
        public virtual void AddedToWorld() { }
38
38
        public virtual void RemovedFromWorld() { }

Up to file-list AngelXNA/Infrastructure/World.cs:

@@ -106,6 +106,7 @@ namespace AngelXNA.Infrastructure
106
106
        public bool IsSimulating
107
107
        {
108
108
            get { return _simulateOn; }
109
            set { _simulateOn = value; }
109
110
        }
110
111
111
112
        protected World()
@@ -463,15 +464,15 @@ namespace AngelXNA.Infrastructure
463
464
            }
464
465
        }
465
466
466
        public void Render(GraphicsDevice aDevice, SpriteBatch aBatch)
467
        public void Render(GameTime aTime, GraphicsDevice aDevice, SpriteBatch aBatch)
467
468
        {
468
469
            // Setup the camera matrix.
469
470
            // theCamera.Render();
470
471
471
            DrawRenderables(aDevice, aBatch);
472
            DrawRenderables(aTime, aDevice, aBatch);
472
473
473
474
            if (_gameManager != null)
474
                _gameManager.Render(_camera, aDevice, aBatch);
475
                _gameManager.Render(aTime, _camera, aDevice, aBatch);
475
476
476
477
            //Render debug information
477
478
            SpatialGraphManager.Instance.Render(_camera, aDevice, aBatch);
@@ -480,7 +481,7 @@ namespace AngelXNA.Infrastructure
480
481
            DeveloperConsole.Instance.Render(_camera, aDevice, aBatch);
481
482
        }
482
483
483
        public void DrawRenderables(GraphicsDevice aDevice, SpriteBatch aBatch)
484
        public void DrawRenderables(GameTime aTime, GraphicsDevice aDevice, SpriteBatch aBatch)
484
485
        {
485
486
            // This is very different from the original Angel implementation, but hopefully accomplishes
486
487
            // the same thing?
@@ -493,7 +494,7 @@ namespace AngelXNA.Infrastructure
493
494
                LinkedList<Renderable> currentLayer = _layers[layerOrder[i]];
494
495
                foreach (Renderable renderable in currentLayer)
495
496
                {
496
                    renderable.Render(_camera, aDevice, aBatch);
497
                    renderable.Render(aTime, _camera, aDevice, aBatch);
497
498
                }
498
499
            }
499
500
        }

Up to file-list AngelXNA/Messaging/Switchboard.cs:

@@ -40,7 +40,6 @@ namespace AngelXNA.Messaging
40
40
            }
41
41
        }
42
42
43
        private bool _messagesLocked = false;
44
43
        private Dictionary<string, MessageHandler> _subscriptions = new Dictionary<string,MessageHandler>();
45
44
        private Queue<Message> _messages = new Queue<Message>();
46
45
        private LinkedList<MessageTimer> _delayedMessages = new LinkedList<MessageTimer>();

Up to file-list IntroGame/DemoGameManager.cs:

@@ -35,7 +35,7 @@ namespace IntroGame
35
35
            
36
36
        }
37
37
38
        public override void Render(Camera aCamera, GraphicsDevice aDevice, SpriteBatch aBatch)
38
        public override void Render(GameTime aTime, Camera aCamera, GraphicsDevice aDevice, SpriteBatch aBatch)
39
39
        {
40
40
            
41
41
        }
@@ -142,7 +142,7 @@ namespace IntroGame
142
142
            return null;
143
143
        }
144
144
145
        public override void Render(Camera aCamera, GraphicsDevice aDevice, SpriteBatch aBatch)
145
        public override void Render(GameTime aTime, Camera aCamera, GraphicsDevice aDevice, SpriteBatch aBatch)
146
146
        {
147
147
            Color textColor = new Color(0.5f, 0.5f, 0.5f);
148
148
            SpriteFont font = FontCache.Instance["ConsoleSmall"];