Coins
This commit is contained in:
1 parent
e440224fd8
commit
19bbb052ad
9 files changed
+108
-1
No files matched your search
Binary file not shown.
|
After Width: | Height: | Size: 461 B |
@@ -0,0 +1,43 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://dftfxivu3peog"
|
||||||
|
path="res://.godot/imported/coin.png-7a22d78603b91b8bca023a7cd8e523dd.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://art/coin.png"
|
||||||
|
dest_files=["res://.godot/imported/coin.png-7a22d78603b91b8bca023a7cd8e523dd.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/high_quality_mode=0
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/uastc_level=0
|
||||||
|
compress/rdo_quality_loss=0.0
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
mipmaps/preserve_alpha_test_coverage=false
|
||||||
|
mipmaps/alpha_test_threshold=0.5
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/channel_remap/red=0
|
||||||
|
process/channel_remap/green=1
|
||||||
|
process/channel_remap/blue=2
|
||||||
|
process/channel_remap/alpha=3
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
extends Node2D
|
||||||
|
|
||||||
|
# Called when the node enters the scene tree for the first time.
|
||||||
|
func _ready() -> void:
|
||||||
|
pass # Replace with function body.
|
||||||
|
|
||||||
|
|
||||||
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||||
|
func _process(delta: float) -> void:
|
||||||
|
pass
|
||||||
|
|
||||||
|
func on_contact(body: Node2D) -> void:
|
||||||
|
print(body)
|
||||||
|
%Player2D.coins += 1
|
||||||
|
queue_free()
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://cvboxlqkhn1ef
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
[gd_scene format=3 uid="uid://kstmxoa4dx55"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://cvboxlqkhn1ef" path="res://coin.gd" id="1_0t63x"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://dftfxivu3peog" path="res://art/coin.png" id="1_d5gmh"]
|
||||||
|
|
||||||
|
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_6qpsl"]
|
||||||
|
radius = 7.0
|
||||||
|
height = 20.0
|
||||||
|
|
||||||
|
[node name="Coin" type="Node2D" unique_id=1739014101]
|
||||||
|
script = ExtResource("1_0t63x")
|
||||||
|
|
||||||
|
[node name="Sprite2D" type="Sprite2D" parent="." unique_id=813041394]
|
||||||
|
texture = ExtResource("1_d5gmh")
|
||||||
|
|
||||||
|
[node name="Area2D" type="Area2D" parent="." unique_id=170499029]
|
||||||
|
|
||||||
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D" unique_id=1865546056]
|
||||||
|
shape = SubResource("CapsuleShape2D_6qpsl")
|
||||||
|
|
||||||
|
[connection signal="body_entered" from="Area2D" to="." method="on_contact"]
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
extends RichTextLabel
|
||||||
|
|
||||||
|
# Called when the node enters the scene tree for the first time.
|
||||||
|
func _ready() -> void:
|
||||||
|
pass # Replace with function body.
|
||||||
|
|
||||||
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||||
|
func _process(delta: float) -> void:
|
||||||
|
text = "COINS: " + str(%Player2D.coins)
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://dtomgfu8ib50f
|
||||||
+2
-1
@@ -10,6 +10,7 @@ var fall_timer = 0.0
|
|||||||
var teleport_cooldown = 0
|
var teleport_cooldown = 0
|
||||||
var jumps = 0
|
var jumps = 0
|
||||||
var death_threshold = 1000
|
var death_threshold = 1000
|
||||||
|
var coins = 0
|
||||||
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
pass
|
pass
|
||||||
@@ -50,7 +51,7 @@ func _process(delta: float) -> void:
|
|||||||
else:
|
else:
|
||||||
velocity.x = move_toward(velocity.x, 0, SPEED)
|
velocity.x = move_toward(velocity.x, 0, SPEED)
|
||||||
|
|
||||||
print("PLAYER X POSITION: " + str(position.y))
|
#print("PLAYER X POSITION: " + str(position.y))
|
||||||
if position.y >= death_threshold:
|
if position.y >= death_threshold:
|
||||||
print("SLASH KILL")
|
print("SLASH KILL")
|
||||||
get_tree().reload_current_scene()
|
get_tree().reload_current_scene()
|
||||||
|
|||||||
+16
@@ -5,9 +5,11 @@
|
|||||||
[ext_resource type="PackedScene" uid="uid://ckqable762x8v" path="res://block.tscn" id="2_036b0"]
|
[ext_resource type="PackedScene" uid="uid://ckqable762x8v" path="res://block.tscn" id="2_036b0"]
|
||||||
[ext_resource type="Script" uid="uid://bds4m5we8nwe3" path="res://fps_label.gd" id="2_dwbse"]
|
[ext_resource type="Script" uid="uid://bds4m5we8nwe3" path="res://fps_label.gd" id="2_dwbse"]
|
||||||
[ext_resource type="PackedScene" uid="uid://dx4pfup3sbk0f" path="res://long_block.tscn" id="3_dwbse"]
|
[ext_resource type="PackedScene" uid="uid://dx4pfup3sbk0f" path="res://long_block.tscn" id="3_dwbse"]
|
||||||
|
[ext_resource type="Script" uid="uid://dtomgfu8ib50f" path="res://coin_label.gd" id="3_wse8f"]
|
||||||
[ext_resource type="PackedScene" uid="uid://byh115n12sgvt" path="res://teleporter.tscn" id="4_gbfbk"]
|
[ext_resource type="PackedScene" uid="uid://byh115n12sgvt" path="res://teleporter.tscn" id="4_gbfbk"]
|
||||||
[ext_resource type="PackedScene" uid="uid://bos6oh7nwyeca" path="res://vertical_long_block.tscn" id="4_pkg7o"]
|
[ext_resource type="PackedScene" uid="uid://bos6oh7nwyeca" path="res://vertical_long_block.tscn" id="4_pkg7o"]
|
||||||
[ext_resource type="PackedScene" uid="uid://biot4cuwgohvo" path="res://longer_block.tscn" id="6_dwbse"]
|
[ext_resource type="PackedScene" uid="uid://biot4cuwgohvo" path="res://longer_block.tscn" id="6_dwbse"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://kstmxoa4dx55" path="res://coin.tscn" id="8_ioo17"]
|
||||||
|
|
||||||
[node name="World" type="Node2D" unique_id=1327991900]
|
[node name="World" type="Node2D" unique_id=1327991900]
|
||||||
process_mode = 3
|
process_mode = 3
|
||||||
@@ -37,6 +39,18 @@ bbcode_enabled = true
|
|||||||
text = "FPS:"
|
text = "FPS:"
|
||||||
script = ExtResource("2_dwbse")
|
script = ExtResource("2_dwbse")
|
||||||
|
|
||||||
|
[node name="RichTextLabel3" type="RichTextLabel" parent="CanvasLayer" unique_id=1876455502]
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
offset_top = 45.0
|
||||||
|
offset_bottom = 45.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
bbcode_enabled = true
|
||||||
|
text = "COINS:"
|
||||||
|
script = ExtResource("3_wse8f")
|
||||||
|
|
||||||
[node name="Player2D" parent="." unique_id=889851478 instance=ExtResource("1_aqk2v")]
|
[node name="Player2D" parent="." unique_id=889851478 instance=ExtResource("1_aqk2v")]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
position = Vector2(55, 59)
|
position = Vector2(55, 59)
|
||||||
@@ -68,6 +82,8 @@ position = Vector2(166, 200)
|
|||||||
[node name="VerticalLongBlock" parent="Tutorial" unique_id=925152188 instance=ExtResource("4_pkg7o")]
|
[node name="VerticalLongBlock" parent="Tutorial" unique_id=925152188 instance=ExtResource("4_pkg7o")]
|
||||||
position = Vector2(250, 141)
|
position = Vector2(250, 141)
|
||||||
|
|
||||||
|
[node name="Coin" parent="Tutorial" unique_id=1739014101 instance=ExtResource("8_ioo17")]
|
||||||
|
|
||||||
[node name="ZoeLevel" type="Node2D" parent="." unique_id=980267417]
|
[node name="ZoeLevel" type="Node2D" parent="." unique_id=980267417]
|
||||||
visible = false
|
visible = false
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user