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

Method constructor

src/GameEngine.js:26–40  ·  view source on GitHub ↗
(props)

Source from the content-addressed store, hash-verified

24
25export default class GameEngine extends Component {
26 constructor(props) {
27 super(props);
28 this.state = {
29 entities: null
30 };
31 this.timer = props.timer || new DefaultTimer();
32 this.timer.subscribe(this.updateHandler);
33 this.touches = [];
34 this.screen = Dimensions.get("window");
35 this.previousTime = null;
36 this.previousDelta = null;
37 this.events = [];
38 this.touchProcessor = props.touchProcessor(this.touches);
39 this.layout = null;
40 }
41
42 async componentDidMount() {
43 let entities = getEntitiesFromProps(this.props);

Callers

nothing calls this directly

Calls 1

subscribeMethod · 0.80

Tested by

no test coverage detected