Last active
August 29, 2015 14:08
-
-
Save StoneCypher/39819e57a9f4637f0a9a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** @jsx React.DOM */ | |
| 'use strict'; | |
| var React = require('react/addons'), | |
| Planet = require('gamecontrols/planet'), // just pretend | |
| Vortex = require('gamecontrols/vortex'), // just pretend | |
| Nebula = require('gamecontrols/nebula'), // just pretend | |
| Ship = require('gamecontrols/planet'); // just pretend | |
| module.exports = React.createClass({ | |
| render: function() { | |
| var Objects = [], | |
| GameState = this.fctx().gamestate, | |
| ItemAdd = function(Item, Index) { | |
| Objects.push(React.createDescriptor(Item.item_type, Item.item_props)); | |
| }, | |
| ObjPlaces = GameState.drawables; | |
| ObjPlaces.map(function(Place) { | |
| GameState[Place].map(function(GameItem) | |
| ItemAdd(GameItem); | |
| ); | |
| }); | |
| return (<div className="GameMap">{Objects}</div>); | |
| } | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment