MCPcopy Create free account
hub / github.com/bberak/react-native-game-engine / constructor

Method constructor

src/GameLoop.js:7–17  ·  view source on GitHub ↗
(props)

Source from the content-addressed store, hash-verified

5
6export default class GameLoop extends Component {
7 constructor(props) {
8 super(props);
9 this.timer = props.timer || new DefaultTimer();
10 this.timer.subscribe(this.updateHandler);
11 this.touches = [];
12 this.screen = Dimensions.get("window");
13 this.previousTime = null;
14 this.previousDelta = null;
15 this.touchProcessor = props.touchProcessor(this.touches);
16 this.layout = null;
17 }
18
19 componentDidMount() {
20 if (this.props.running) this.start();

Callers

nothing calls this directly

Calls 1

subscribeMethod · 0.80

Tested by

no test coverage detected