Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var BusView = new Class({
- initialize: function (x,y)
- {
- this.sprite = new sprite(false,vec2(x,y), true, false);
- this.sprite.cells( vec2(50,50) );
- this.id = -1;
- this.sprite.frame = 4;
- },
- setID: function (id) {
- this.id = id;
- this.sprite.frame = 1;
- },
- });
- var Grid = new Class({
- initialize: function (size) {
- this.views = [];
- //this.sprite = new sprite('./data/property.png',vec2());
- //this.sprite.visible = false;
- phoenix.loadTexture(project.path("./data/property.png"), true);
- for (i = 0; i < size; i++)
- {
- for (j = 0; j < size; j++)
- {
- this.views[i*100 + j] = new BusView(i*65,j*65);
- }
- }
- }
- });
- var grid = new Grid(10);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement