feat: add arrow
This commit is contained in:
parent
e66880df80
commit
e2a2fb7a07
Binary file not shown.
|
|
@ -0,0 +1,40 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://bpfvioqm4kbv8"
|
||||
path="res://.godot/imported/arrow.png-9053f2b1a9a256ad0bb19fe69a4c452c.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/Images/arrow.png"
|
||||
dest_files=["res://.godot/imported/arrow.png-9053f2b1a9a256ad0bb19fe69a4c452c.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
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
|
||||
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
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 6.3 KiB |
Binary file not shown.
|
|
@ -0,0 +1,40 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://wf3o3dowhbp0"
|
||||
path="res://.godot/imported/speed.png-461d2d606e22e16e98a193de8bef31f1.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/Images/speed.png"
|
||||
dest_files=["res://.godot/imported/speed.png-461d2d606e22e16e98a193de8bef31f1.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
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
|
||||
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
|
||||
|
|
@ -21,10 +21,11 @@ var slow_walk_mult = SLOW_MULT
|
|||
|
||||
var max_stamina: float = BASE_STAMINA
|
||||
var stamina: float = max_stamina
|
||||
var speed = BASE_SPEED
|
||||
|
||||
# ---- Pickups ----
|
||||
const BASE_BONUS_TIME_AMOUNT = 30 # seconds
|
||||
const BASE_SPEED_BOOST_FACTOR = 2
|
||||
const BASE_BONUS_TIME_AMOUNT = 10 # seconds
|
||||
const BASE_SPEED_BOOST_FACTOR = 1.5
|
||||
var bonus_time_amount: float = BASE_BONUS_TIME_AMOUNT # seconds
|
||||
var speed_boost_factor: float = BASE_SPEED_BOOST_FACTOR
|
||||
|
||||
|
|
@ -45,6 +46,7 @@ func _ready() -> void:
|
|||
$TimeLimit.start()
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
|
||||
# On fail screen, ignore further input
|
||||
if not is_active:
|
||||
return
|
||||
|
|
@ -57,7 +59,7 @@ func _process(delta: float) -> void:
|
|||
$HUD/TimeLimitLabel.text = "%02d:%02d" % [time_left/60, time_left - (time_left/60) * 60]
|
||||
|
||||
var dir = Input.get_vector("player_move_left", "player_move_right", "player_move_up", "player_move_down")
|
||||
var speed: float = BASE_SPEED
|
||||
var speed: float = speed
|
||||
if $SpeedBoostTimer.time_left > 0:
|
||||
speed *= speed_boost_factor
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
[ext_resource type="Script" uid="uid://bobw4cfg1v6gj" path="res://player.gd" id="1_4flbx"]
|
||||
[ext_resource type="PackedScene" uid="uid://52hoyqjot1cs" path="res://shop.tscn" id="2_i3pqv"]
|
||||
[ext_resource type="PackedScene" uid="uid://ct7cc7qg3hpu1" path="res://upgrades.tscn" id="2_onrkg"]
|
||||
[ext_resource type="Texture2D" uid="uid://bpfvioqm4kbv8" path="res://assets/Images/arrow.png" id="4_hqtel"]
|
||||
|
||||
[sub_resource type="PlaneMesh" id="PlaneMesh_sh265"]
|
||||
size = Vector2(1, 1)
|
||||
|
|
@ -26,6 +27,8 @@ radius = 30.0
|
|||
height = 0.5
|
||||
radius = 50.0
|
||||
|
||||
[sub_resource type="QuadMesh" id="QuadMesh_hqtel"]
|
||||
|
||||
[node name="Player" type="CharacterBody3D" unique_id=17046866]
|
||||
collision_layer = 4
|
||||
collision_mask = 3
|
||||
|
|
@ -291,6 +294,12 @@ debug_color = Color(0.5381443, 0.5430501, 0.4771669, 0.41960785)
|
|||
shape = SubResource("CylinderShape3D_hqtel")
|
||||
debug_color = Color(0.6328197, 0.113640614, 0, 0.41960785)
|
||||
|
||||
[node name="Arrow" type="MeshInstance2D" parent="." unique_id=1435818053]
|
||||
position = Vector2(604, 57)
|
||||
scale = Vector2(69.25001, 66.25001)
|
||||
mesh = SubResource("QuadMesh_hqtel")
|
||||
texture = ExtResource("4_hqtel")
|
||||
|
||||
[connection signal="timeout" from="TimeLimit" to="." method="_on_time_limit_timeout"]
|
||||
[connection signal="shop_exit" from="Shop" to="." method="_on_shop_shop_exit"]
|
||||
[connection signal="pressed" from="FinishControl/ContinueButton" to="." method="_on_continue_button_pressed"]
|
||||
|
|
|
|||
|
|
@ -0,0 +1,14 @@
|
|||
extends Node
|
||||
|
||||
var enabled: bool = false
|
||||
var cost: int = 1250
|
||||
var upgrade_name: String = "Chad"
|
||||
var upgrade_description: String = "Camina mes rapid"
|
||||
var icon: Texture2D = preload("res://assets/Images/speed.png")
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func update() -> void:
|
||||
if enabled:
|
||||
print("Updating speed")
|
||||
$"..".parent.speed = $"..".parent.BASE_SPEED * 1.25
|
||||
|
|
@ -0,0 +1 @@
|
|||
uid://dkuthx1fv8d5q
|
||||
|
|
@ -3,6 +3,7 @@
|
|||
[ext_resource type="Script" uid="uid://4f7orky5jeey" path="res://upgrades.gd" id="1_k80ou"]
|
||||
[ext_resource type="Script" uid="uid://dk6j6kddvr2jc" path="res://stamina.gd" id="2_alr6r"]
|
||||
[ext_resource type="Script" uid="uid://y8o46kv384xl" path="res://chad_walk.gd" id="3_ba88x"]
|
||||
[ext_resource type="Script" uid="uid://dkuthx1fv8d5q" path="res://speed.gd" id="4_fn3gv"]
|
||||
|
||||
[node name="Upgrades" type="Node" unique_id=1238785974]
|
||||
script = ExtResource("1_k80ou")
|
||||
|
|
@ -12,3 +13,6 @@ script = ExtResource("2_alr6r")
|
|||
|
||||
[node name="ChadWalk" type="Node" parent="." unique_id=1436596930]
|
||||
script = ExtResource("3_ba88x")
|
||||
|
||||
[node name="Speed" type="Node" parent="." unique_id=343986648]
|
||||
script = ExtResource("4_fn3gv")
|
||||
|
|
|
|||
Loading…
Reference in New Issue