Permalink
Browse files

New minified version using Google Closure Compiler.

  • Loading branch information...
1 parent f26b33a commit 10da86db09ab3386cfe18e55d1ac3a82ecf6eccb Rob Kleffner committed Jul 28, 2011
View
@@ -16,7 +16,7 @@ Enjine.AnimationSequence = function(startRow, startColumn, endRow, endColumn) {
if ((this.StartRow == this.EndRow) && (this.StartColumn == this.EndColumn)) {
this.SingleFrame = true;
}
-}
+};
/**
Subclass that extends the regular sprite with animation capability.
@@ -34,7 +34,7 @@ Enjine.AnimatedSprite = function() {
//cheesy dictionary hack to make animation sequences more accessible
this.Sequences = new Object();
-}
+};
Enjine.AnimatedSprite.prototype = new Enjine.FrameSprite();
@@ -82,59 +82,59 @@ Enjine.AnimatedSprite.prototype.Update = function(delta) {
this.Playing = false;
}
}
-}
+};
Enjine.AnimatedSprite.prototype.PlaySequence = function(seqName, loop) {
this.Playing = true;
this.Looping = loop;
this.CurrentSequence = this.Sequences["seq_" + seqName];
this.FrameX = this.CurrentSequence.StartColumn * this.FrameWidth;
this.FrameY = this.CurrentSequence.StartRow * this.FrameHeight;
-}
+};
Enjine.AnimatedSprite.prototype.StopLooping = function() {
this.Looping = false;
-}
+};
Enjine.AnimatedSprite.prototype.StopPlaying = function() {
this.Playing = false;
-}
+};
Enjine.AnimatedSprite.prototype.SetFrameWidth = function(width) {
this.FrameWidth = width;
this.Rows = this.Image.width / this.FrameWidth;
-}
+};
Enjine.AnimatedSprite.prototype.SetFrameHeight = function(height) {
this.FrameHeight = height;
this.Columns = this.Image.height / this.FrameHeight;
-}
+};
Enjine.AnimatedSprite.prototype.SetColumnCount = function(columnCount) {
this.FrameWidth = this.Image.width / columnCount;
this.Columns = columnCount;
-}
+};
Enjine.AnimatedSprite.prototype.SetRowCount = function(rowCount) {
this.FrameHeight = this.Image.height / rowCount;
this.Rows = rowCount;
-}
+};
Enjine.AnimatedSprite.prototype.AddExistingSequence = function(name, sequence) {
this.Sequences["seq_" + name] = sequence;
-}
+};
Enjine.AnimatedSprite.prototype.AddNewSequence = function(name, startRow, startColumn, endRow, endColumn) {
this.Sequences["seq_" + name] = new Enjine.AnimationSequence(startRow, startColumn, endRow, endColumn);
-}
+};
Enjine.AnimatedSprite.prototype.DeleteSequence = function(name) {
if (this.Sequences["seq_" + name] != null) {
delete this.Sequences["seq_" + name];
}
-}
+};
Enjine.AnimatedSprite.prototype.ClearSequences = function() {
delete this.Sequences;
this.Sequences = new Object();
-}
+};
View
@@ -7,7 +7,7 @@ Enjine.Application = function() {
this.canvas = null;
this.timer = null;
this.stateContext = null;
-}
+};
Enjine.Application.prototype = {
Update: function(delta) {
@@ -32,4 +32,4 @@ Enjine.Application.prototype = {
this.timer.Start();
}
-}
+};
View
@@ -6,4 +6,4 @@
Enjine.Camera = function() {
this.X = 0;
this.Y = 0;
-}
+};
View
@@ -15,7 +15,7 @@ Enjine.Collideable = function(obj, width, height, collisionEvent) {
} else {
this.CollisionEvent = function() {}
}
-}
+};
Enjine.Collideable.prototype = {
Update: function() {
@@ -46,4 +46,4 @@ Enjine.Collideable.prototype = {
this.CollisionEvent(other);
other.CollisionEvent(this);
}
-}
+};
View
@@ -5,8 +5,8 @@
Enjine.Drawable = function() {
this.ZOrder = 0;
-}
+};
Enjine.Drawable.prototype = {
Draw: function(context) { }
-}
+};
@@ -6,7 +6,7 @@
Enjine.DrawableManager = function() {
this.Unsorted = true;
this.Objects = [];
-}
+};
Enjine.DrawableManager.prototype = {
Add: function(object) {
@@ -84,4 +84,4 @@ Enjine.DrawableManager.prototype = {
}
}
}
-}
+};
View
@@ -8,10 +8,10 @@ Enjine.FrameSprite = function() {
this.FrameY = 0;
this.FrameWidth = 0;
this.FrameHeight = 0;
-}
+};
Enjine.FrameSprite.prototype = new Enjine.Sprite();
Enjine.FrameSprite.prototype.Draw = function(context, camera) {
context.drawImage(this.Image, this.FrameX, this.FrameY, this.FrameWidth, this.FrameHeight, this.X - camera.X, this.Y - camera.Y, this.FrameWidth, this.FrameHeight);
-}
+};
View
@@ -8,7 +8,7 @@ Enjine.GameCanvas = function() {
this.Context2D = null;
this.BackBuffer = null;
this.BackBufferContext2D = null;
-}
+};
Enjine.GameCanvas.prototype = {
Initialize: function(canvasId, resWidth, resHeight) {
@@ -28,4 +28,4 @@ Enjine.GameCanvas.prototype = {
EndDraw: function() {
this.Context2D.drawImage(this.BackBuffer, 0, 0, this.BackBuffer.width, this.BackBuffer.height, 0, 0, this.Canvas.width, this.Canvas.height);
}
-}
+};
View
@@ -8,7 +8,7 @@ Enjine.GameTimer = function() {
this.LastTime = 0;
this.IntervalFunc = null;
this.UpdateObject = null;
-}
+};
Enjine.GameTimer.prototype = {
Start: function() {
@@ -30,4 +30,4 @@ Enjine.GameTimer.prototype = {
Stop: function() {
clearInterval(this.IntervalFunc);
}
-}
+};
View
@@ -67,4 +67,4 @@ Enjine.KeyboardInput = {
event.preventDefault();
}
}
-}
+};
View
@@ -116,4 +116,4 @@ Enjine.Resources = {
this.currentTime = -1;
this.play();
}
-}
+};
View
@@ -7,10 +7,10 @@ Enjine.Sprite = function() {
this.X = 0;
this.Y = 0;
this.Image = null;
-}
+};
Enjine.Sprite.prototype = new Enjine.Drawable();
Enjine.Sprite.prototype.Draw = function(context, camera) {
context.drawImage(this.Image, this.X - camera.X, this.Y - camera.Y);
-}
+};
View
@@ -10,7 +10,7 @@ Enjine.GameStateContext = function(defaultState) {
this.State = defaultState;
this.State.Enter();
}
-}
+};
Enjine.GameStateContext.prototype = {
ChangeState: function(newState) {
@@ -29,7 +29,7 @@ Enjine.GameStateContext.prototype = {
Draw: function(delta) {
this.State.Draw(delta);
}
-}
+};
/**
* Base game state class to at least ensure that all the functions exist.
@@ -42,4 +42,4 @@ Enjine.GameState.prototype = {
Update: function(delta) {},
Draw: function(context) {},
CheckForChange: function(context) {}
-}
+};
View
@@ -39,13 +39,13 @@ Mario.LevelState.prototype.Enter = function() {
this.Level = levelGenerator.CreateLevel(this.LevelType, this.LevelDifficulty);
//play music here
- if (this.LevelType === Mario.LevelType.Overground) {
- Mario.PlayOvergroundMusic();
- } else if (this.LevelType === Mario.LevelType.Underground) {
- Mario.PlayUndergroundMusic();
- } else if (this.LevelType === Mario.LevelType.Castle) {
- Mario.PlayCastleMusic();
- }
+ //if (this.LevelType === Mario.LevelType.Overground) {
+ //Mario.PlayOvergroundMusic();
+ //} else if (this.LevelType === Mario.LevelType.Underground) {
+ //Mario.PlayUndergroundMusic();
+ //} else if (this.LevelType === Mario.LevelType.Castle) {
+ //Mario.PlayCastleMusic();
+ //}
this.Paused = false;
this.Layer = new Mario.LevelRenderer(this.Level, 320, 240);
@@ -308,7 +308,7 @@ Mario.LevelState.prototype.Draw = function(context) {
}
if (Mario.MarioCharacter.WinTime > 0) {
- Mario.StopMusic();
+ //Mario.StopMusic();
t = Mario.MarioCharacter.WinTime + this.Delta;
t = t * t * 0.2;
@@ -322,7 +322,7 @@ Mario.LevelState.prototype.Draw = function(context) {
}
if (Mario.MarioCharacter.DeathTime > 0) {
- Mario.StopMusic();
+ //Mario.StopMusic();
t = Mario.MarioCharacter.DeathTime + this.Delta;
t = t * t * 0.1;
View
@@ -109,11 +109,11 @@ Mario.MapState.prototype.Enter = function() {
this.LevelDifficulty = 0;
this.LevelType = 0;
- Mario.PlayMapMusic();
+ //Mario.PlayMapMusic();
};
Mario.MapState.prototype.Exit = function() {
- Mario.StopMusic();
+ //Mario.StopMusic();
delete this.WaterSprite;
delete this.DecoSprite;
View
@@ -45,11 +45,11 @@ Mario.TitleState.prototype.Enter = function() {
Mario.MarioCharacter = new Mario.Character();
Mario.MarioCharacter.Image = Enjine.Resources.Images["smallMario"];
- Mario.PlayTitleMusic();
+ //Mario.PlayTitleMusic();
};
Mario.TitleState.prototype.Exit = function() {
- Mario.StopMusic();
+ //Mario.StopMusic();
this.drawManager.Clear();
delete this.drawManager;
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
Oops, something went wrong.

0 comments on commit 10da86d

Please sign in to comment.