rikukissa
5/28/2015 - 8:18 PM

game.js

function render(state) {
  return (
    <Scene>
      <Healtbar hearts={state.hearts} />

      <Camera>
        <Player x={state.player.x} y={state.player.y} />

        {
          state.enemies.map((enemy) => {
            return <Enemy x={enemy.x} y={enemy.y} />
          })
        }

      </Camera>
    </Scene>
  )
}
function render(state) {
  return (
    <Game>
      <Scene>
        <Healtbar hearts={state.hearts} />

        <Camera>
          <Player x={state.player.x} y={state.player.y} />

          {
            state.enemies.map((enemy) => {
              return <Enemy x={enemy.x} y={enemy.y} />
            })
          }

        </Camera>
      </Scene>

      <Scene>
        <Healtbar hearts={state.hearts} />

        <Camera>
          <Player x={state.player.x} y={state.player.y} />

          {
            state.enemies.map((enemy) => {
              return <Enemy x={enemy.x} y={enemy.y} />
            })
          }

        </Camera>
      </Scene>
      
      <Scene>
        <Healtbar hearts={state.hearts} />

        <Camera>
          <Player x={state.player.x} y={state.player.y} />

          {
            state.enemies.map((enemy) => {
              return <Enemy x={enemy.x} y={enemy.y} />
            })
          }

        </Camera>
      </Scene>
    </Game>
  )
}