feat: Flag & Button art, Grass FPS, State times, falling test level
This commit is contained in:
parent
a1f7b700ae
commit
77b6ca3b7b
BIN
assets/contraption/FreeButton.aseprite
Normal file
BIN
assets/contraption/FreeButton.aseprite
Normal file
Binary file not shown.
BIN
assets/contraption/freeButton.png
Normal file
BIN
assets/contraption/freeButton.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 230 B |
35
assets/contraption/freeButton.png.import
Normal file
35
assets/contraption/freeButton.png.import
Normal 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
|
||||||
BIN
assets/contraption/freeButtonSlider.png
Normal file
BIN
assets/contraption/freeButtonSlider.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 156 B |
35
assets/contraption/freeButtonSlider.png.import
Normal file
35
assets/contraption/freeButtonSlider.png.import
Normal 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
|
||||||
BIN
assets/neutral object/blobby1Flag.png
Normal file
BIN
assets/neutral object/blobby1Flag.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 343 B |
35
assets/neutral object/blobby1Flag.png.import
Normal file
35
assets/neutral object/blobby1Flag.png.import
Normal 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
|
||||||
BIN
assets/neutral object/flagPoleAndBasePlant.png
Normal file
BIN
assets/neutral object/flagPoleAndBasePlant.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 603 B |
35
assets/neutral object/flagPoleAndBasePlant.png.import
Normal file
35
assets/neutral object/flagPoleAndBasePlant.png.import
Normal 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
|
||||||
BIN
assets/neutral object/saveFlag.aseprite
Normal file
BIN
assets/neutral object/saveFlag.aseprite
Normal file
Binary file not shown.
@ -16,12 +16,19 @@ var saved_displacement
|
|||||||
var is_idle_swinging
|
var is_idle_swinging
|
||||||
var start_swing_time := 0.0
|
var start_swing_time := 0.0
|
||||||
var begin_idle
|
var begin_idle
|
||||||
|
var time_since_last_exec := 0.0
|
||||||
|
var fps_limit := 30.0
|
||||||
|
|
||||||
func _ready():
|
func _ready():
|
||||||
# TODO This could probably fuck something up later? For other randomness based events
|
# TODO This could probably fuck something up later? For other randomness based events
|
||||||
randomize()
|
randomize()
|
||||||
|
|
||||||
func _process(delta: float) -> void:
|
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 distance: float = abs(global_position.x - blobby.global_position.x + 6)
|
||||||
var v_distance: float = abs(global_position.y - blobby.global_position.y + 11)
|
var v_distance: float = abs(global_position.y - blobby.global_position.y + 11)
|
||||||
#Velocity relative to the grass, increasing distance is - velocity
|
#Velocity relative to the grass, increasing distance is - velocity
|
||||||
|
|||||||
75
src/Levels/Falling Level.tscn
Normal file
75
src/Levels/Falling Level.tscn
Normal file
File diff suppressed because one or more lines are too long
@ -36,10 +36,10 @@ unique_name_in_owner = true
|
|||||||
drag_margin_bottom = 0.3
|
drag_margin_bottom = 0.3
|
||||||
|
|
||||||
[node name="AnimatedSprite" parent="BlobbyCam/ParallaxBackground/ParallaxLayer5" index="4"]
|
[node name="AnimatedSprite" parent="BlobbyCam/ParallaxBackground/ParallaxLayer5" index="4"]
|
||||||
frame = 3
|
frame = 1
|
||||||
|
|
||||||
[node name="AnimatedSprite2" parent="BlobbyCam/ParallaxBackground/ParallaxLayer5" index="5"]
|
[node name="AnimatedSprite2" parent="BlobbyCam/ParallaxBackground/ParallaxLayer5" index="5"]
|
||||||
frame = 3
|
frame = 1
|
||||||
|
|
||||||
[node name="Blobby" parent="." instance=ExtResource( 8 )]
|
[node name="Blobby" parent="." instance=ExtResource( 8 )]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
|
|||||||
@ -2,7 +2,9 @@ extends Node
|
|||||||
class_name StateMachine
|
class_name StateMachine
|
||||||
|
|
||||||
var state = null setget set_state
|
var state = null setget set_state
|
||||||
|
var state_time := 0.0
|
||||||
var previous_state = null
|
var previous_state = null
|
||||||
|
var previous_state_time := 0.0
|
||||||
var states = {}
|
var states = {}
|
||||||
|
|
||||||
# Parent Node that uses these states
|
# Parent Node that uses these states
|
||||||
@ -19,7 +21,12 @@ func _physics_process(delta):
|
|||||||
_state_logic(delta)
|
_state_logic(delta)
|
||||||
var transition = _get_transition(delta)
|
var transition = _get_transition(delta)
|
||||||
if transition != null:
|
if transition != null:
|
||||||
|
previous_state_time = state_time
|
||||||
|
state_time = 0.0
|
||||||
set_state(transition)
|
set_state(transition)
|
||||||
|
else:
|
||||||
|
state_time += delta
|
||||||
|
|
||||||
|
|
||||||
func state_matching_method_exists(state_string: String) -> bool:
|
func state_matching_method_exists(state_string: String) -> bool:
|
||||||
return parent.has_method(state_string)
|
return parent.has_method(state_string)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user