pennymeat
This commit is contained in:
parent
26a351b408
commit
d6f5925198
4 changed files with 311 additions and 6 deletions
42
maps/future/pennymeat.gd
Normal file
42
maps/future/pennymeat.gd
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
extends "res://maps/map.gd"
|
||||||
|
|
||||||
|
|
||||||
|
const Lightning = preload("res://objects/gfx/lightning.tscn")
|
||||||
|
|
||||||
|
|
||||||
|
export var min_interval: float
|
||||||
|
export var max_interval: float
|
||||||
|
export var fade_time: float
|
||||||
|
|
||||||
|
|
||||||
|
onready var lightning_spawn: Node2D = $"%LightningSpawn"
|
||||||
|
onready var bright_sky: ColorRect = $"%BrightSky"
|
||||||
|
onready var lightning_timer: Timer = $"%LightningTimer"
|
||||||
|
onready var clouds: Sprite = $"%Clouds"
|
||||||
|
|
||||||
|
|
||||||
|
var slaughter_shard_collected := false
|
||||||
|
|
||||||
|
|
||||||
|
func _spawn_lightning():
|
||||||
|
var bolt = Lightning.instance()
|
||||||
|
bright_sky.modulate.a = 1.0
|
||||||
|
clouds.modulate = Color(1.2, 1.2, 1.2)
|
||||||
|
bolt.position.x = rand_range(-100.0, 100.0)
|
||||||
|
bolt.fade_time = fade_time
|
||||||
|
lightning_spawn.add_child(bolt)
|
||||||
|
var tween = create_tween()
|
||||||
|
tween.set_parallel(true)
|
||||||
|
tween.tween_property(bright_sky, "modulate:a", 0.0, fade_time).set_trans(Tween.TRANS_EXPO)
|
||||||
|
tween.tween_property(clouds, "modulate", Color.white, fade_time).set_trans(Tween.TRANS_EXPO)
|
||||||
|
lightning_timer.start(rand_range(min_interval, max_interval))
|
||||||
|
|
||||||
|
|
||||||
|
func _physics_process(delta):
|
||||||
|
._physics_process(delta)
|
||||||
|
if get_tree().get_nodes_in_group("enemy").size() == 0:
|
||||||
|
if not slaughter_shard_collected:
|
||||||
|
Audio.play_shard_sound()
|
||||||
|
Game.score += 500
|
||||||
|
Game.shards_collected[0] = true
|
||||||
|
slaughter_shard_collected = true
|
262
maps/future/pennymeat.tscn
Normal file
262
maps/future/pennymeat.tscn
Normal file
File diff suppressed because one or more lines are too long
|
@ -14,7 +14,8 @@ const BloodSpray := preload("res://objects/environment/blood/blood_spray.tscn")
|
||||||
## whether to be temporarily invulnerable after respawning
|
## whether to be temporarily invulnerable after respawning
|
||||||
export var use_iframes: bool = false
|
export var use_iframes: bool = false
|
||||||
## horizontal movement speed
|
## horizontal movement speed
|
||||||
export var walk_speed: float = 50.0
|
export var walk_speed: float = 75.0
|
||||||
|
export var air_speed: float = 80.0
|
||||||
## frames until walk speed peak (at 60fps reference)
|
## frames until walk speed peak (at 60fps reference)
|
||||||
export var walk_acceleration_frames: float = 1.0
|
export var walk_acceleration_frames: float = 1.0
|
||||||
## speed to push pushable objects at
|
## speed to push pushable objects at
|
||||||
|
@ -397,7 +398,7 @@ func _process_grounded(delta: float) -> void:
|
||||||
## called when player can move left and rightpass # Repass # Rpass # Replace with function body.eplace with function body.place with function body.
|
## called when player can move left and rightpass # Repass # Rpass # Replace with function body.eplace with function body.place with function body.
|
||||||
func _process_horizontal_movement(delta: float) -> void:
|
func _process_horizontal_movement(delta: float) -> void:
|
||||||
var input_dir = sign(Input.get_axis("move_left", "move_right") + get_stick_input(JOY_AXIS_0)) # sign() to normalize
|
var input_dir = sign(Input.get_axis("move_left", "move_right") + get_stick_input(JOY_AXIS_0)) # sign() to normalize
|
||||||
velocity.x = input_dir * walk_speed
|
velocity.x = input_dir * air_speed
|
||||||
if input_dir != 0.0:
|
if input_dir != 0.0:
|
||||||
graphics.scale.x = input_dir
|
graphics.scale.x = input_dir
|
||||||
|
|
||||||
|
|
|
@ -883,7 +883,7 @@ moving_platform_apply_velocity_on_leave = 2
|
||||||
script = ExtResource( 1 )
|
script = ExtResource( 1 )
|
||||||
walk_acceleration_frames = 4.0
|
walk_acceleration_frames = 4.0
|
||||||
gravity = 700.0
|
gravity = 700.0
|
||||||
jump_force = 140.0
|
jump_force = 160.0
|
||||||
double_jump_force = 124.0
|
double_jump_force = 124.0
|
||||||
dash_ascension = 124.0
|
dash_ascension = 124.0
|
||||||
dash_speed = 124.0
|
dash_speed = 124.0
|
||||||
|
@ -1567,8 +1567,8 @@ one_shot = true
|
||||||
[connection signal="state_physics_processing" from="StateChart/Root/Movement" to="." method="_process_movement"]
|
[connection signal="state_physics_processing" from="StateChart/Root/Movement" to="." method="_process_movement"]
|
||||||
[connection signal="state_entered" from="StateChart/Root/Movement/Grounded" to="." method="_on_Grounded_state_entered"]
|
[connection signal="state_entered" from="StateChart/Root/Movement/Grounded" to="." method="_on_Grounded_state_entered"]
|
||||||
[connection signal="state_physics_processing" from="StateChart/Root/Movement/Grounded" to="." method="_process_grounded"]
|
[connection signal="state_physics_processing" from="StateChart/Root/Movement/Grounded" to="." method="_process_grounded"]
|
||||||
[connection signal="state_physics_processing" from="StateChart/Root/Movement/Grounded/CanWalk" to="." method="_process_horizontal_movement_grounded"]
|
|
||||||
[connection signal="state_physics_processing" from="StateChart/Root/Movement/Grounded/CanWalk" to="." method="_process_can_walk"]
|
[connection signal="state_physics_processing" from="StateChart/Root/Movement/Grounded/CanWalk" to="." method="_process_can_walk"]
|
||||||
|
[connection signal="state_physics_processing" from="StateChart/Root/Movement/Grounded/CanWalk" to="." method="_process_horizontal_movement_grounded"]
|
||||||
[connection signal="state_entered" from="StateChart/Root/Movement/Grounded/CanWalk/Still" to="." method="_on_Still_state_entered"]
|
[connection signal="state_entered" from="StateChart/Root/Movement/Grounded/CanWalk/Still" to="." method="_on_Still_state_entered"]
|
||||||
[connection signal="state_entered" from="StateChart/Root/Movement/Grounded/CanWalk/Walking" to="." method="_on_Walking_state_entered"]
|
[connection signal="state_entered" from="StateChart/Root/Movement/Grounded/CanWalk/Walking" to="." method="_on_Walking_state_entered"]
|
||||||
[connection signal="state_entered" from="StateChart/Root/Movement/Grounded/CanWalk/Blinking" to="." method="_on_Blinking_state_entered"]
|
[connection signal="state_entered" from="StateChart/Root/Movement/Grounded/CanWalk/Blinking" to="." method="_on_Blinking_state_entered"]
|
||||||
|
@ -1579,8 +1579,8 @@ one_shot = true
|
||||||
[connection signal="state_entered" from="StateChart/Root/Movement/Grounded/Shooting" to="." method="_on_Shooting_state_entered"]
|
[connection signal="state_entered" from="StateChart/Root/Movement/Grounded/Shooting" to="." method="_on_Shooting_state_entered"]
|
||||||
[connection signal="state_entered" from="StateChart/Root/Movement/Grounded/Pushing" to="." method="_on_Pushing_state_entered"]
|
[connection signal="state_entered" from="StateChart/Root/Movement/Grounded/Pushing" to="." method="_on_Pushing_state_entered"]
|
||||||
[connection signal="state_physics_processing" from="StateChart/Root/Movement/Grounded/Pushing" to="." method="_process_pushing"]
|
[connection signal="state_physics_processing" from="StateChart/Root/Movement/Grounded/Pushing" to="." method="_process_pushing"]
|
||||||
[connection signal="state_entered" from="StateChart/Root/Movement/Airborne" to="." method="_on_Airborne_state_entered"]
|
|
||||||
[connection signal="state_entered" from="StateChart/Root/Movement/Airborne" to="." method="reset_fall_speed"]
|
[connection signal="state_entered" from="StateChart/Root/Movement/Airborne" to="." method="reset_fall_speed"]
|
||||||
|
[connection signal="state_entered" from="StateChart/Root/Movement/Airborne" to="." method="_on_Airborne_state_entered"]
|
||||||
[connection signal="state_physics_processing" from="StateChart/Root/Movement/Airborne" to="." method="_process_gravity"]
|
[connection signal="state_physics_processing" from="StateChart/Root/Movement/Airborne" to="." method="_process_gravity"]
|
||||||
[connection signal="state_physics_processing" from="StateChart/Root/Movement/Airborne/Jump" to="." method="_process_horizontal_movement"]
|
[connection signal="state_physics_processing" from="StateChart/Root/Movement/Airborne/Jump" to="." method="_process_horizontal_movement"]
|
||||||
[connection signal="state_physics_processing" from="StateChart/Root/Movement/Airborne/Jump" to="." method="_process_jump"]
|
[connection signal="state_physics_processing" from="StateChart/Root/Movement/Airborne/Jump" to="." method="_process_jump"]
|
||||||
|
@ -1607,8 +1607,8 @@ one_shot = true
|
||||||
[connection signal="state_physics_processing" from="StateChart/Root/Movement/Climbing" to="." method="_process_climbing"]
|
[connection signal="state_physics_processing" from="StateChart/Root/Movement/Climbing" to="." method="_process_climbing"]
|
||||||
[connection signal="state_entered" from="StateChart/Root/Movement/Inactive" to="." method="_on_Inactive_state_entered"]
|
[connection signal="state_entered" from="StateChart/Root/Movement/Inactive" to="." method="_on_Inactive_state_entered"]
|
||||||
[connection signal="state_exited" from="StateChart/Root/Movement/Inactive" to="." method="_on_Inactive_state_exited"]
|
[connection signal="state_exited" from="StateChart/Root/Movement/Inactive" to="." method="_on_Inactive_state_exited"]
|
||||||
[connection signal="state_entered" from="StateChart/Root/Movement/Teleporting" to="." method="_on_Inactive_state_entered"]
|
|
||||||
[connection signal="state_entered" from="StateChart/Root/Movement/Teleporting" to="." method="_on_Teleporting_state_entered"]
|
[connection signal="state_entered" from="StateChart/Root/Movement/Teleporting" to="." method="_on_Teleporting_state_entered"]
|
||||||
|
[connection signal="state_entered" from="StateChart/Root/Movement/Teleporting" to="." method="_on_Inactive_state_entered"]
|
||||||
[connection signal="state_exited" from="StateChart/Root/Movement/Teleporting" to="." method="_on_Inactive_state_exited"]
|
[connection signal="state_exited" from="StateChart/Root/Movement/Teleporting" to="." method="_on_Inactive_state_exited"]
|
||||||
[connection signal="state_entered" from="StateChart/Root/Movement/Appearing" to="." method="_on_Inactive_state_entered"]
|
[connection signal="state_entered" from="StateChart/Root/Movement/Appearing" to="." method="_on_Inactive_state_entered"]
|
||||||
[connection signal="state_entered" from="StateChart/Root/Movement/Appearing" to="." method="_on_Appearing_state_entered"]
|
[connection signal="state_entered" from="StateChart/Root/Movement/Appearing" to="." method="_on_Appearing_state_entered"]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue