mirror of
https://git.kittycat.homes/zoe/pegchamp.git
synced 2024-08-15 03:15:39 +00:00
added springs
This commit is contained in:
parent
62762082f7
commit
e08c2c3ef2
19 changed files with 201 additions and 16 deletions
|
|
@ -47,8 +47,10 @@ func set_particle_direction(collider):
|
|||
collider.set_particle_direction(linear_velocity.normalized() * -1)
|
||||
|
||||
func bounce_of(collider):
|
||||
if (collider.has_method("bouncy")):
|
||||
if collider.has_method("bouncy"):
|
||||
apply_central_impulse(linear_velocity.normalized() * shotspeed / 6)
|
||||
if (collider).has_method("spring"):
|
||||
apply_central_impulse(Vector2(0, -64))
|
||||
|
||||
func aim():
|
||||
cameraTransform.position = Vector2.ZERO + get_local_mouse_position().normalized() * 10
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ tracks/2/keys = {
|
|||
|
||||
[node name="Ball" type="RigidBody2D"]
|
||||
collision_layer = 4
|
||||
collision_mask = 5
|
||||
collision_mask = 13
|
||||
mass = 90.0
|
||||
physics_material_override = ExtResource( 3 )
|
||||
continuous_cd = 2
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue