Adding tutorial
This commit is contained in:
@@ -4,7 +4,7 @@ enum Stats {WATER, FERTILITY, PRESENCE}
|
||||
|
||||
const TERRAIN_SIZE = Vector2i(300, 300)
|
||||
const LEVELS_NUMBER : int = 20
|
||||
const MAP_RATIO = 8;
|
||||
const MAP_RATIO = 10;
|
||||
|
||||
@onready var image := Image.create_empty(
|
||||
TERRAIN_SIZE.x,
|
||||
|
||||
32
scripts/tuto.gd
Normal file
32
scripts/tuto.gd
Normal file
@@ -0,0 +1,32 @@
|
||||
extends Control
|
||||
|
||||
var texts = [
|
||||
"Hi there !",
|
||||
"Welcome to GJ 238 b, it was a nice and hospitable exoplanet, but the humans settled in and ruined this place.",
|
||||
"Now nothing grows, and the animals won't show up !",
|
||||
"You got to help me with this, I prepared a lot of seeds, you just have to click and I'll plant.",
|
||||
"The problem is that the place is quite inhospitable, each plant needs a special amount of water, a certain quality of ground (the fertility), and more or less space (population).",
|
||||
"You have to place these plants in a special order, like the little ones first, for example.",
|
||||
"The trees at the corner of the map are where the animals are hiding, it need a certain amount of vegetation around them to go out.",
|
||||
"You can move on the map with the arrows (maj for maximal speed!), or you can click and grab with the mouse middle button.",
|
||||
"Take advantage of the scanners at the top of the screen if you're lost.",
|
||||
"Oh, I almost forgot, you can skip a seed with the right click if you want!",
|
||||
"Let's help those animals!",
|
||||
]
|
||||
|
||||
var cursor = 0
|
||||
|
||||
func _ready():
|
||||
next_text()
|
||||
$RobotSpeak.playing = true
|
||||
|
||||
func _input(event):
|
||||
if event.is_action_pressed("plant"):
|
||||
next_text()
|
||||
|
||||
func next_text():
|
||||
if cursor >= len(texts):
|
||||
hide()
|
||||
else:
|
||||
$MarginContainer/Text.text = texts[cursor]
|
||||
cursor += 1
|
||||
Reference in New Issue
Block a user