Change of Friction
This commit is contained in:
@@ -4,36 +4,36 @@ signal complete(option)
|
|||||||
|
|
||||||
|
|
||||||
func _on_new_game_button_pressed() -> void:
|
func _on_new_game_button_pressed() -> void:
|
||||||
emit_signal('complete', 'new game')
|
emit_signal('complete', 'new game')
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
func _on_quit_button_pressed() -> void:
|
func _on_quit_button_pressed() -> void:
|
||||||
get_tree().quit()
|
get_tree().quit()
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
func _on_continue_button_mouse_entered() -> void:
|
func _on_continue_button_mouse_entered() -> void:
|
||||||
if not $'Menu/Menu Elements/Menu Options/Continue/Continue Button'.disabled:
|
if not $'Menu/Menu Elements/Menu Options/Continue/Continue Button'.disabled:
|
||||||
$'Menu Button Hover'.play(0.0)
|
$'Menu Button Hover'.play(0.0)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
func _on_new_game_button_mouse_entered() -> void:
|
func _on_new_game_button_mouse_entered() -> void:
|
||||||
$'Menu Button Hover'.play(0.0)
|
$'Menu Button Hover'.play(0.0)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
func _on_settings_button_mouse_entered() -> void:
|
func _on_settings_button_mouse_entered() -> void:
|
||||||
$'Menu Button Hover'.play(0.0)
|
$'Menu Button Hover'.play(0.0)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
func _on_credits_button_mouse_entered() -> void:
|
func _on_credits_button_mouse_entered() -> void:
|
||||||
$'Menu Button Hover'.play(0.0)
|
$'Menu Button Hover'.play(0.0)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
func _on_quit_button_mouse_entered() -> void:
|
func _on_quit_button_mouse_entered() -> void:
|
||||||
$'Menu Button Hover'.play(0.0)
|
$'Menu Button Hover'.play(0.0)
|
||||||
return
|
return
|
||||||
|
@@ -2,5 +2,5 @@ extends Node2D
|
|||||||
|
|
||||||
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
$YSort/Player.load_hud($HUD)
|
$YSort/Player.load_hud($HUD)
|
||||||
return
|
return
|
||||||
|
@@ -6,14 +6,14 @@
|
|||||||
[sub_resource type="CircleShape2D" id=1]
|
[sub_resource type="CircleShape2D" id=1]
|
||||||
radius = 6.38067
|
radius = 6.38067
|
||||||
|
|
||||||
[node name="Node2D" type="Area2D"]
|
[node name="coin" type="Area2D"]
|
||||||
script = ExtResource( 2 )
|
script = ExtResource( 2 )
|
||||||
|
|
||||||
[node name="Sprite" type="Sprite" parent="."]
|
[node name="Sprite" type="Sprite" parent="."]
|
||||||
position = Vector2( 28.3217, 41.6257 )
|
position = Vector2( 28.3217, 41.6257 )
|
||||||
texture = ExtResource( 1 )
|
texture = ExtResource( 1 )
|
||||||
|
|
||||||
[node name="Collision" type="CollisionShape2D" parent="."]
|
[node name="coin" type="CollisionShape2D" parent="."]
|
||||||
position = Vector2( 28.4389, 40.6703 )
|
position = Vector2( 28.4389, 40.6703 )
|
||||||
shape = SubResource( 1 )
|
shape = SubResource( 1 )
|
||||||
|
|
||||||
|
@@ -3,6 +3,9 @@ extends Node2D
|
|||||||
onready var coin = preload("res://Levels/Interactives/coin.tscn")
|
onready var coin = preload("res://Levels/Interactives/coin.tscn")
|
||||||
#onready var coin_container = get_node("YSort/coin_container")
|
#onready var coin_container = get_node("YSort/coin_container")
|
||||||
|
|
||||||
|
#have event for timer to run out
|
||||||
|
|
||||||
|
|
||||||
var screensize
|
var screensize
|
||||||
var score = 0
|
var score = 0
|
||||||
|
|
||||||
|
@@ -44,7 +44,7 @@ tile_data = PoolIntArray( 0, 0, 65537, 1, 0, 65538, 2, 0, 65538, 3, 0, 65538, 4,
|
|||||||
[node name="Player" parent="YSort" instance=ExtResource( 1 )]
|
[node name="Player" parent="YSort" instance=ExtResource( 1 )]
|
||||||
position = Vector2( 20, 26 )
|
position = Vector2( 20, 26 )
|
||||||
ACCELERATION = 500
|
ACCELERATION = 500
|
||||||
FRICTION = 500
|
FRICTION = 100
|
||||||
|
|
||||||
[node name="tree6" type="StaticBody2D" parent="YSort"]
|
[node name="tree6" type="StaticBody2D" parent="YSort"]
|
||||||
|
|
||||||
|
@@ -85,11 +85,15 @@ func _input(event: InputEvent) -> void:
|
|||||||
|
|
||||||
|
|
||||||
func _on_Hitbox_area_entered(area: Area2D) -> void:
|
func _on_Hitbox_area_entered(area: Area2D) -> void:
|
||||||
|
print(area.name)
|
||||||
|
|
||||||
|
if area.name.begins_with("coin"):
|
||||||
|
print("COIN")
|
||||||
|
|
||||||
if not 'enemies' in area.get_parent().get_groups() or area.name.begins_with("detection") or (not area.name.begins_with("snowball")) :
|
if not 'enemies' in area.get_parent().get_groups() or area.name.begins_with("detection") or (not area.name.begins_with("snowball")) :
|
||||||
return
|
return
|
||||||
|
|
||||||
if area.name.begins_with("snowball"):
|
|
||||||
print("SNOWBALL FIGHT")
|
|
||||||
|
|
||||||
if health_index != 0:
|
if health_index != 0:
|
||||||
health_index -= 1
|
health_index -= 1
|
||||||
|
Reference in New Issue
Block a user