- Godot Engine Game Development Projects
- Chris Bradfield
- 97字
- 2021-06-18 18:51:29
Main script
Add a script to the Main node (use the Empty template) and add the following variables:
extends Node
export (PackedScene) var Coin
export (int) var playtime
var level
var score
var time_left
var screensize
var 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.
推薦閱讀
- 三菱FX3U/5U PLC從入門到精通
- Learning Apache Cassandra(Second Edition)
- ROS機(jī)器人編程與SLAM算法解析指南
- MicroPython Projects
- Maya 2012從入門到精通
- Learning Azure Cosmos DB
- 單片機(jī)技能與實(shí)訓(xùn)
- Mastering Exploratory Analysis with pandas
- Web璀璨:Silverlight應(yīng)用技術(shù)完全指南
- Learn Microsoft Azure
- 從機(jī)器學(xué)習(xí)到無人駕駛
- 這樣用Word!
- Microsoft Office 365:Exchange Online Implementation and Migration(Second Edition)
- 深度剖析:硬盤固件級(jí)數(shù)據(jù)恢復(fù)
- 智能機(jī)器人技術(shù):安保、巡邏、處置類警用機(jī)器人研究實(shí)踐