feat: Flag & Button art, Grass FPS, State times, falling test level

This commit is contained in:
Jakob Feldmann 2023-04-10 17:05:52 +02:00
parent a1f7b700ae
commit 77b6ca3b7b
14 changed files with 231 additions and 2 deletions

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 230 B

View File

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/freeButton.png-2a50360c11506c59fb3dcd7e421a611d.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/contraption/freeButton.png"
dest_files=[ "res://.import/freeButton.png-2a50360c11506c59fb3dcd7e421a611d.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=false
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=false
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 156 B

View File

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/freeButtonSlider.png-b94089bc85fb03cd527ec1850fb2e5a9.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/contraption/freeButtonSlider.png"
dest_files=[ "res://.import/freeButtonSlider.png-b94089bc85fb03cd527ec1850fb2e5a9.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=false
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=false
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 343 B

View File

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/blobby1Flag.png-60e5078d5dc434d045980ee29e64c901.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/neutral object/blobby1Flag.png"
dest_files=[ "res://.import/blobby1Flag.png-60e5078d5dc434d045980ee29e64c901.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=false
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=false
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 603 B

View File

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/flagPoleAndBasePlant.png-e45ba5d02a2979eb7a8268ee9fe1a4cb.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/neutral object/flagPoleAndBasePlant.png"
dest_files=[ "res://.import/flagPoleAndBasePlant.png-e45ba5d02a2979eb7a8268ee9fe1a4cb.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=false
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=false
svg/scale=1.0

Binary file not shown.

View File

@ -16,12 +16,19 @@ var saved_displacement
var is_idle_swinging
var start_swing_time := 0.0
var begin_idle
var time_since_last_exec := 0.0
var fps_limit := 30.0
func _ready():
# TODO This could probably fuck something up later? For other randomness based events
randomize()
func _process(delta: float) -> void:
# TODO This should be in the settings and applied to all shaders
time_since_last_exec += delta
if time_since_last_exec <= 1.0/fps_limit:
return
time_since_last_exec = 0.0
var distance: float = abs(global_position.x - blobby.global_position.x + 6)
var v_distance: float = abs(global_position.y - blobby.global_position.y + 11)
#Velocity relative to the grass, increasing distance is - velocity

File diff suppressed because one or more lines are too long

View File

@ -36,10 +36,10 @@ unique_name_in_owner = true
drag_margin_bottom = 0.3
[node name="AnimatedSprite" parent="BlobbyCam/ParallaxBackground/ParallaxLayer5" index="4"]
frame = 3
frame = 1
[node name="AnimatedSprite2" parent="BlobbyCam/ParallaxBackground/ParallaxLayer5" index="5"]
frame = 3
frame = 1
[node name="Blobby" parent="." instance=ExtResource( 8 )]
unique_name_in_owner = true

View File

@ -2,7 +2,9 @@ extends Node
class_name StateMachine
var state = null setget set_state
var state_time := 0.0
var previous_state = null
var previous_state_time := 0.0
var states = {}
# Parent Node that uses these states
@ -19,7 +21,12 @@ func _physics_process(delta):
_state_logic(delta)
var transition = _get_transition(delta)
if transition != null:
previous_state_time = state_time
state_time = 0.0
set_state(transition)
else:
state_time += delta
func state_matching_method_exists(state_string: String) -> bool:
return parent.has_method(state_string)