June 2018
Beginner to intermediate
298 pages
7h 38m
English
Add a script to the Main node (use the Empty template) and add the following variables:
extends Nodeexport (PackedScene) var Coinexport (int) var playtimevar levelvar scorevar time_leftvar screensizevar playing = false
The Coin and Playtime properties will now appear in the Inspector when you click on Main. Drag Coin.tscn from the FileSystem panel and drop it in the Coin property. Set Playtime to 30 (this is the amount of time the game will last). The remaining variables will be used later in the code.
Read now
Unlock full access