[Hands with you Godot game development] FlappyBird: 9.2 OVER the world No GAME (lower)

This section renderings

Here Insert Picture Description

1. build a scene

Open the UI scene
Here Insert Picture Description

2. Set AnimationPlayer

It needs a total of two animation

Here Insert Picture Description

  • Information display panel

Example 5 using the present, so that information from the pop-up plate
Here Insert Picture Description

  • Dashboard hidden (default animation)

This animation requires only a
Here Insert Picture Description

3. InfoBoard script

#InfoBoard.gd
extends TextureRect

func _ready():
	add_to_group("GAME_STATE")
	
func on_game_over():
	$LabelCurrent.text = str(GameData.score)#显示本局成绩
	$LabelRecord.text = str(GameData.load_record())#显示历史最好成绩
	$AnimationPlayer.play("show")#显示计分板

4. Run

Run Game Scene

Here Insert Picture Description

Published 383 original articles · won praise 1250 · Views 190,000 +

Guess you like

Origin blog.csdn.net/hello_tute/article/details/105156048