--- /dev/null
+# Littlest Roadmap
+
+- UI for config system
+- Animations
+- Items
+- Level transitions
+- Improve friendly fire of AI
+
* TODO: Make rect() routines agnostic to cell dimensions
* TODO: Optimize set operations
*/
-BitGrid = new Y.Class('BitGrid', {
+BitGrid = Y.subclass('BitGrid', {
init : function init(w, h){
this.width = w;
this.height = h;
-Log = new Y.Class('Log', {
+Log = Y.subclass('Log', {
_n : 0,
DEFAULT_OPTIONS : {
autoScroll : true,
-Layer = new Y.Class('Layer', {
+Layer = Y.subclass('Layer', {
_cssClasses : 'portal layer',
canvas : null,
-Cooldown = new Y.Class('Cooldown', {
+Cooldown = Y.subclass('Cooldown', {
'init' : function(cooldown, isReady){
this.cooldown = cooldown; // ms
this.ready = isReady || true;
-FpsSparkline = new Y.Class('FpsSparkline', {
+FpsSparkline = Y.subclass('FpsSparkline', {
init : function init(loop, el, w,h, maxBuffer, interval){
this.buffer = [];
}
},
-Node = new Y.Class('Node', {
+Node = Y.subclass('Node', {
init : function Node(x, y, w, h, parent) {
this.w = w;
this.h = h;
}
}),
-Leaf = new Y.Class('Leaf', {
+Leaf = Y.subclass('Leaf', {
toString : function toString(){
return LeafType.toString(this.type)+'('+this.x+','+this.y+', value='+this.value+')';
}
}
}),
-PointQuadTree = new Y.Class('PointQuadTree', {
+PointQuadTree = Y.subclass('PointQuadTree', {
'init' : function(minX,minY, maxX,maxY) {
this.x1 = this.x = minX;
this.y1 = this.y = minY;
CAPACITY = 8,
REGION_ID = 0,
-Region = new Y.Class('Region', {
+Region = Y.subclass('Region', {
init : function init(x1,y1, x2,y2, value){
Rect.call(this, x1,y1, x2,y2);
this.id = REGION_ID++;
}
}),
-QuadTree = new Y.Class('QuadTree', {
+QuadTree = Y.subclass('QuadTree', {
depth : 0,
parent : null,
regions : [],
};
var
-RedBlackTree = new Y.Class('RedBlackTree', {
+RedBlackTree = Y.subclass('RedBlackTree', {
init : function init(key, value){
if (this.key !== undefined)
this.setKey(key, value);
// -*- mode: JavaScript; tab-width: 4; indent-tabs-mode: nil; -*-
tanks.config = {
- ui : {
- showGridCoords : false,
- showCountdown : false
- },
- pathing : {
- overlayAIPaths : true,
- overlayPathmap : false,
- traceTrajectories : false
+ defaults : {
+ ui : {
+ showGridCoords : false,
+ showCountdown : true
+ },
+ pathing : {
+ overlayAIPaths : false,
+ overlayPathmap : false,
+ traceTrajectories : false
+ }
}
};
+
+tanks.config.values = Y(tanks.config.defaults).clone().end();
\ No newline at end of file
-tanks.Game = new Y.Class('Game', {
+tanks.Game = Y.subclass('Game', {
overlayPathmap : false,
E =
game.addUnit(new Tank(2), 0,1);
- // game.addUnit(new Tank(2), 1,0);
- // game.addUnit(new Tank(2), 8,1);
+ game.addUnit(new Tank(2), 1,0);
+ game.addUnit(new Tank(2), 8,1);
},
addWall : function addWall(x,y, w,h, isBoundary){
// - Update tanks.config.values
var ns = tanks.ui.config = {}
-, c = tanks.config
+, c = tanks.config.values
, p = c.pathing
;
--- /dev/null
+Config = Y.subclass('Config', {
+
+
+
+});
\ No newline at end of file