mirror of
https://git.kittycat.homes/zoe/pegchamp.git
synced 2024-08-15 03:15:39 +00:00
port to godot 3.4 because of 'non breaking changes' i am so mad
This commit is contained in:
parent
d90e99e579
commit
41c3dfa881
25 changed files with 59 additions and 674 deletions
|
|
@ -53,7 +53,7 @@ func bounce_of(collider):
|
|||
apply_central_impulse(Vector2(0, -64))
|
||||
|
||||
func aim():
|
||||
cameraTransform.position = Vector2.ZERO + get_local_mouse_position().normalized() * 10
|
||||
cameraTransform.global_position = self.global_position + get_local_mouse_position().normalized() * 10
|
||||
spawn_trajectory_dots()
|
||||
if(Input.is_action_just_released("shoot")):
|
||||
cameraTransform.position = Vector2.ZERO + linear_velocity.normalized() * 10
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=11 format=2]
|
||||
[gd_scene load_steps=12 format=2]
|
||||
|
||||
[ext_resource path="res://Ball/sprite.png" type="Texture" id=1]
|
||||
[ext_resource path="res://Ball/Ball.gd" type="Script" id=2]
|
||||
|
|
@ -8,6 +8,7 @@
|
|||
[ext_resource path="res://Effects/greenParticle.png" type="Texture" id=6]
|
||||
[ext_resource path="res://Ball/aimingArrow.png" type="Texture" id=7]
|
||||
[ext_resource path="res://Ball/Arrow.gd" type="Script" id=8]
|
||||
[ext_resource path="res://Ball/CameraTransform.gd" type="Script" id=9]
|
||||
|
||||
[sub_resource type="ParticlesMaterial" id=1]
|
||||
lifetime_randomness = 0.5
|
||||
|
|
@ -74,7 +75,10 @@ linear_velocity = Vector2( 0, -10 )
|
|||
script = ExtResource( 2 )
|
||||
|
||||
[node name="CameraTransform" type="RemoteTransform2D" parent="."]
|
||||
pause_mode = 2
|
||||
position = Vector2( 0, 108 )
|
||||
remote_path = NodePath("../../../Camera2D")
|
||||
script = ExtResource( 9 )
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="."]
|
||||
position = Vector2( 0, -10 )
|
||||
|
|
|
|||
4
Ball/CameraTransform.gd
Normal file
4
Ball/CameraTransform.gd
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
extends RemoteTransform2D
|
||||
|
||||
func _ready() -> void:
|
||||
global_position = Vector2(384 / 2, 102)
|
||||
Loading…
Add table
Add a link
Reference in a new issue