Merged with main and fixed merge conflicts
This commit is contained in:
27
Levels/Interactives/Countdown.gd
Normal file
27
Levels/Interactives/Countdown.gd
Normal file
@@ -0,0 +1,27 @@
|
||||
extends Control
|
||||
|
||||
export (int) var minutes =0
|
||||
export (int) var seconds = 0
|
||||
var dsec = 0
|
||||
|
||||
func _physics_process(delta: float) -> void:
|
||||
if seconds > 0 and dsec <= 0:
|
||||
seconds -=1
|
||||
dsec = 10
|
||||
if minutes > 0 and seconds <= 0:
|
||||
minutes -= 1
|
||||
seconds = 60
|
||||
|
||||
if seconds >= 10:
|
||||
$sec.set_text(str(seconds))
|
||||
else:
|
||||
$sec.set_text("0"+str(seconds))
|
||||
|
||||
if dsec >=10:
|
||||
$dsec.set_text(str(dsec))
|
||||
else:
|
||||
$dsec.set_text("0" + str(dsec))
|
||||
|
||||
func _on_Timer_timeout() -> void:
|
||||
dsec-=1
|
||||
pass # Replace with function body.
|
10
Levels/Interactives/coin.gd
Normal file
10
Levels/Interactives/coin.gd
Normal file
@@ -0,0 +1,10 @@
|
||||
extends Area2D
|
||||
|
||||
func _ready() -> void:
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
|
||||
func _on_Node2D_body_entered(body: Node) -> void:
|
||||
if body.get_name() == "Player":
|
||||
queue_free() # Replace with function body.
|
20
Levels/Interactives/coin.tscn
Normal file
20
Levels/Interactives/coin.tscn
Normal file
@@ -0,0 +1,20 @@
|
||||
[gd_scene load_steps=4 format=2]
|
||||
|
||||
[ext_resource path="res://Sprites/Assets/coin.png" type="Texture" id=1]
|
||||
[ext_resource path="res://Levels/Interactives/coin.gd" type="Script" id=2]
|
||||
|
||||
[sub_resource type="CircleShape2D" id=1]
|
||||
radius = 6.38067
|
||||
|
||||
[node name="Node2D" type="Area2D"]
|
||||
script = ExtResource( 2 )
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="."]
|
||||
position = Vector2( 28.3217, 41.6257 )
|
||||
texture = ExtResource( 1 )
|
||||
|
||||
[node name="Collision" type="CollisionShape2D" parent="."]
|
||||
position = Vector2( 28.4389, 40.6703 )
|
||||
shape = SubResource( 1 )
|
||||
|
||||
[connection signal="body_entered" from="." to="." method="_on_Node2D_body_entered"]
|
17
Levels/Interactives/tree.tscn
Normal file
17
Levels/Interactives/tree.tscn
Normal file
@@ -0,0 +1,17 @@
|
||||
[gd_scene load_steps=3 format=2]
|
||||
|
||||
[ext_resource path="res://Sprites/Assets/forestTreeBig.png" type="Texture" id=1]
|
||||
|
||||
[sub_resource type="CapsuleShape2D" id=1]
|
||||
radius = 5.0
|
||||
height = 9.0
|
||||
|
||||
[node name="Tree" type="StaticBody2D"]
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="."]
|
||||
texture = ExtResource( 1 )
|
||||
offset = Vector2( 0, -5 )
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
rotation = 1.5708
|
||||
shape = SubResource( 1 )
|
Reference in New Issue
Block a user