mirror of
https://github.com/kristoferssolo/FuncIt.git
synced 2025-10-21 19:30:35 +00:00
trajectory_list
traajs
This commit is contained in:
parent
3dbcfe8bb3
commit
c780a4db78
12
Pavels/README.md
Normal file
12
Pavels/README.md
Normal file
@ -0,0 +1,12 @@
|
||||
Download git and run in terminal:
|
||||
```terminal
|
||||
git config --global user.name "Your Name"
|
||||
git config --global user.email "youremail@yourdomain.com"
|
||||
```
|
||||
|
||||
Enter in required directory and run:
|
||||
```terminal
|
||||
git clone https://github.com/KristofersSolo/Godot
|
||||
```
|
||||
|
||||
or just use [GitHub Desktop](https://desktop.github.com)
|
||||
@ -0,0 +1,22 @@
|
||||
[gd_scene load_steps=4 format=2]
|
||||
|
||||
[ext_resource path="res://icon.png" type="Texture" id=1]
|
||||
[ext_resource path="res://script/Hyperbola/Hyperbolic_Barrel.gd" type="Script" id=2]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=1]
|
||||
extents = Vector2( 22.5946, 3.60519 )
|
||||
|
||||
[node name="Hyperbolic_Barrel" type="StaticBody2D"]
|
||||
script = ExtResource( 2 )
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
position = Vector2( 30.4661, 0.749161 )
|
||||
shape = SubResource( 1 )
|
||||
|
||||
[node name="icon" type="Sprite" parent="."]
|
||||
position = Vector2( 42.4007, 0.196289 )
|
||||
scale = Vector2( 1.31624, 0.140625 )
|
||||
texture = ExtResource( 1 )
|
||||
|
||||
[node name="Position2D" type="Position2D" parent="."]
|
||||
position = Vector2( 97.6552, 0.0842819 )
|
||||
@ -0,0 +1,22 @@
|
||||
[gd_scene load_steps=4 format=2]
|
||||
|
||||
[ext_resource path="res://pixil-frame-0 (1).png" type="Texture" id=1]
|
||||
[ext_resource path="res://script/Hyperbola/Hyperbolic_Bullet.gd" type="Script" id=2]
|
||||
|
||||
[sub_resource type="CapsuleShape2D" id=1]
|
||||
radius = 5.4212
|
||||
height = 7.62897
|
||||
|
||||
[node name="Bullet" type="Area2D"]
|
||||
script = ExtResource( 2 )
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="."]
|
||||
position = Vector2( 2, -19 )
|
||||
scale = Vector2( 0.199834, 0.199834 )
|
||||
texture = ExtResource( 1 )
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
rotation = 1.5708
|
||||
shape = SubResource( 1 )
|
||||
|
||||
[connection signal="body_entered" from="." to="." method="_on_Bullet_body_entered"]
|
||||
@ -0,0 +1,12 @@
|
||||
[gd_scene load_steps=4 format=2]
|
||||
|
||||
[ext_resource path="res://Line_Trajectory/Line_Bullet.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://script/Hyperbola/Hyperbolic_Env.gd" type="Script" id=2]
|
||||
[ext_resource path="res://script/Hyperbola/Hyperbolic_Bullet.gd" type="Script" id=3]
|
||||
|
||||
[node name="Env" type="Node2D"]
|
||||
script = ExtResource( 2 )
|
||||
|
||||
[node name="Bullet" parent="." instance=ExtResource( 1 )]
|
||||
position = Vector2( 0, -0.222725 )
|
||||
script = ExtResource( 3 )
|
||||
22
Pavels/bullet_trajectory/Line_Trajectory/Line_Barrel.tscn
Normal file
22
Pavels/bullet_trajectory/Line_Trajectory/Line_Barrel.tscn
Normal file
@ -0,0 +1,22 @@
|
||||
[gd_scene load_steps=4 format=2]
|
||||
|
||||
[ext_resource path="res://icon.png" type="Texture" id=1]
|
||||
[ext_resource path="res://script/Line/Line_Barrel.gd" type="Script" id=2]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=1]
|
||||
extents = Vector2( 22.5946, 3.60519 )
|
||||
|
||||
[node name="Line_Barrel" type="StaticBody2D"]
|
||||
script = ExtResource( 2 )
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
position = Vector2( 30.4661, 0.749161 )
|
||||
shape = SubResource( 1 )
|
||||
|
||||
[node name="icon" type="Sprite" parent="."]
|
||||
position = Vector2( 32.281, 0.196289 )
|
||||
scale = Vector2( 1, 0.140625 )
|
||||
texture = ExtResource( 1 )
|
||||
|
||||
[node name="Position2D" type="Position2D" parent="."]
|
||||
position = Vector2( 64.7166, 0.0842819 )
|
||||
22
Pavels/bullet_trajectory/Line_Trajectory/Line_Bullet.tscn
Normal file
22
Pavels/bullet_trajectory/Line_Trajectory/Line_Bullet.tscn
Normal file
@ -0,0 +1,22 @@
|
||||
[gd_scene load_steps=4 format=2]
|
||||
|
||||
[ext_resource path="res://pixil-frame-0 (1).png" type="Texture" id=1]
|
||||
[ext_resource path="res://script/Line/Line_Bullet.gd" type="Script" id=2]
|
||||
|
||||
[sub_resource type="CapsuleShape2D" id=1]
|
||||
radius = 5.4212
|
||||
height = 7.62897
|
||||
|
||||
[node name="Bullet" type="Area2D"]
|
||||
script = ExtResource( 2 )
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="."]
|
||||
position = Vector2( 2, -19 )
|
||||
scale = Vector2( 0.199834, 0.199834 )
|
||||
texture = ExtResource( 1 )
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
rotation = 1.5708
|
||||
shape = SubResource( 1 )
|
||||
|
||||
[connection signal="body_entered" from="." to="." method="_on_Bullet_body_entered"]
|
||||
10
Pavels/bullet_trajectory/Line_Trajectory/Line_Env.tscn
Normal file
10
Pavels/bullet_trajectory/Line_Trajectory/Line_Env.tscn
Normal file
@ -0,0 +1,10 @@
|
||||
[gd_scene load_steps=3 format=2]
|
||||
|
||||
[ext_resource path="res://Line_Trajectory/Line_Bullet.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://script/Line/Line_Env.gd" type="Script" id=2]
|
||||
|
||||
[node name="Env" type="Node2D"]
|
||||
script = ExtResource( 2 )
|
||||
|
||||
[node name="Bullet" parent="." instance=ExtResource( 1 )]
|
||||
position = Vector2( 0, -0.222725 )
|
||||
@ -0,0 +1,22 @@
|
||||
[gd_scene load_steps=4 format=2]
|
||||
|
||||
[ext_resource path="res://icon.png" type="Texture" id=1]
|
||||
[ext_resource path="res://script/Parabola/Parabolic_Barrel.gd" type="Script" id=2]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=1]
|
||||
extents = Vector2( 8.79762, 3.60519 )
|
||||
|
||||
[node name="Parabolic_Barrel" type="StaticBody2D"]
|
||||
script = ExtResource( 2 )
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
position = Vector2( 13.539, 2.08551 )
|
||||
shape = SubResource( 1 )
|
||||
|
||||
[node name="icon" type="Sprite" parent="."]
|
||||
position = Vector2( 16.2448, 0.641744 )
|
||||
scale = Vector2( 0.387507, 0.251987 )
|
||||
texture = ExtResource( 1 )
|
||||
|
||||
[node name="Position2D" type="Position2D" parent="."]
|
||||
position = Vector2( 34.426, 0.975182 )
|
||||
@ -0,0 +1,22 @@
|
||||
[gd_scene load_steps=4 format=2]
|
||||
|
||||
[ext_resource path="res://pixil-frame-0 (1).png" type="Texture" id=1]
|
||||
[ext_resource path="res://script/Line/Line_Bullet.gd" type="Script" id=2]
|
||||
|
||||
[sub_resource type="CapsuleShape2D" id=1]
|
||||
radius = 5.4212
|
||||
height = 7.62897
|
||||
|
||||
[node name="Bullet" type="Area2D"]
|
||||
script = ExtResource( 2 )
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="."]
|
||||
position = Vector2( 2, -19 )
|
||||
scale = Vector2( 0.199834, 0.199834 )
|
||||
texture = ExtResource( 1 )
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
rotation = 1.5708
|
||||
shape = SubResource( 1 )
|
||||
|
||||
[connection signal="body_entered" from="." to="." method="_on_Bullet_body_entered"]
|
||||
@ -0,0 +1,12 @@
|
||||
[gd_scene load_steps=4 format=2]
|
||||
|
||||
[ext_resource path="res://Line_Trajectory/Line_Bullet.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://script/Parabola/Parabolic_Env.gd" type="Script" id=2]
|
||||
[ext_resource path="res://script/Parabola/Parabolic_Bullet.gd" type="Script" id=3]
|
||||
|
||||
[node name="Env" type="Node2D"]
|
||||
script = ExtResource( 2 )
|
||||
|
||||
[node name="Bullet" parent="." instance=ExtResource( 1 )]
|
||||
position = Vector2( 0, -0.222725 )
|
||||
script = ExtResource( 3 )
|
||||
19
Pavels/bullet_trajectory/Player.tscn
Normal file
19
Pavels/bullet_trajectory/Player.tscn
Normal file
@ -0,0 +1,19 @@
|
||||
[gd_scene load_steps=4 format=2]
|
||||
|
||||
[ext_resource path="res://pixilart-drawing.png" type="Texture" id=1]
|
||||
[ext_resource path="res://script/KinematicBody2D.gd" type="Script" id=2]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=1]
|
||||
extents = Vector2( 22.279, 10 )
|
||||
|
||||
[node name="Player" type="KinematicBody2D"]
|
||||
position = Vector2( 400, 296 )
|
||||
script = ExtResource( 2 )
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="."]
|
||||
position = Vector2( 4, -17 )
|
||||
texture = ExtResource( 1 )
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
position = Vector2( 0.381104, 0.412598 )
|
||||
shape = SubResource( 1 )
|
||||
22
Pavels/bullet_trajectory/Sine_Trajectory/Sine_Barrel.tscn
Normal file
22
Pavels/bullet_trajectory/Sine_Trajectory/Sine_Barrel.tscn
Normal file
@ -0,0 +1,22 @@
|
||||
[gd_scene load_steps=4 format=2]
|
||||
|
||||
[ext_resource path="res://icon.png" type="Texture" id=1]
|
||||
[ext_resource path="res://script/Sine/Sine_Barrel.gd" type="Script" id=2]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=1]
|
||||
extents = Vector2( 21.0351, 6.99966 )
|
||||
|
||||
[node name="Sine_Barrel" type="StaticBody2D"]
|
||||
script = ExtResource( 2 )
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="."]
|
||||
position = Vector2( 32.0917, 0.471939 )
|
||||
scale = Vector2( 1, 0.336339 )
|
||||
texture = ExtResource( 1 )
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
position = Vector2( 30.8681, 0 )
|
||||
shape = SubResource( 1 )
|
||||
|
||||
[node name="Position2D" type="Position2D" parent="."]
|
||||
position = Vector2( 64.7166, 0.0842819 )
|
||||
22
Pavels/bullet_trajectory/Sine_Trajectory/Sine_Bullet.tscn
Normal file
22
Pavels/bullet_trajectory/Sine_Trajectory/Sine_Bullet.tscn
Normal file
@ -0,0 +1,22 @@
|
||||
[gd_scene load_steps=4 format=2]
|
||||
|
||||
[ext_resource path="res://pixil-frame-0 (1).png" type="Texture" id=1]
|
||||
[ext_resource path="res://script/Line/Line_Bullet.gd" type="Script" id=2]
|
||||
|
||||
[sub_resource type="CapsuleShape2D" id=1]
|
||||
radius = 5.4212
|
||||
height = 7.62897
|
||||
|
||||
[node name="Bullet" type="Area2D"]
|
||||
script = ExtResource( 2 )
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="."]
|
||||
position = Vector2( 2, -19 )
|
||||
scale = Vector2( 0.199834, 0.199834 )
|
||||
texture = ExtResource( 1 )
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
rotation = 1.5708
|
||||
shape = SubResource( 1 )
|
||||
|
||||
[connection signal="body_entered" from="." to="." method="_on_Bullet_body_entered"]
|
||||
12
Pavels/bullet_trajectory/Sine_Trajectory/Sine_Env.tscn
Normal file
12
Pavels/bullet_trajectory/Sine_Trajectory/Sine_Env.tscn
Normal file
@ -0,0 +1,12 @@
|
||||
[gd_scene load_steps=4 format=2]
|
||||
|
||||
[ext_resource path="res://Line_Trajectory/Line_Bullet.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://script/Sine/Sine_Env.gd" type="Script" id=2]
|
||||
[ext_resource path="res://script/Sine/Sine_Bullet.gd" type="Script" id=3]
|
||||
|
||||
[node name="Env" type="Node2D"]
|
||||
script = ExtResource( 2 )
|
||||
|
||||
[node name="Bullet" parent="." instance=ExtResource( 1 )]
|
||||
position = Vector2( 0, -0.222725 )
|
||||
script = ExtResource( 3 )
|
||||
7
Pavels/bullet_trajectory/default_env.tres
Normal file
7
Pavels/bullet_trajectory/default_env.tres
Normal file
@ -0,0 +1,7 @@
|
||||
[gd_resource type="Environment" load_steps=2 format=2]
|
||||
|
||||
[sub_resource type="ProceduralSky" id=1]
|
||||
|
||||
[resource]
|
||||
background_mode = 2
|
||||
background_sky = SubResource( 1 )
|
||||
32
Pavels/bullet_trajectory/game.tscn
Normal file
32
Pavels/bullet_trajectory/game.tscn
Normal file
@ -0,0 +1,32 @@
|
||||
[gd_scene load_steps=6 format=2]
|
||||
|
||||
[ext_resource path="res://Player.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://icon.png" type="Texture" id=3]
|
||||
[ext_resource path="res://script/Gun.gd" type="Script" id=4]
|
||||
[ext_resource path="res://script/Mob.gd" type="Script" id=5]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=1]
|
||||
extents = Vector2( 31.7698, 29.9446 )
|
||||
|
||||
[node name="Node2D" type="Node2D"]
|
||||
|
||||
[node name="Mob" type="KinematicBody2D" parent="." groups=[
|
||||
"mobs",
|
||||
]]
|
||||
position = Vector2( -0.000213623, 0.000244141 )
|
||||
script = ExtResource( 5 )
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="Mob"]
|
||||
position = Vector2( 748.393, 296.081 )
|
||||
texture = ExtResource( 3 )
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Mob"]
|
||||
position = Vector2( 748.393, 293.562 )
|
||||
shape = SubResource( 1 )
|
||||
one_way_collision_margin = 0.0
|
||||
|
||||
[node name="Player" parent="." instance=ExtResource( 1 )]
|
||||
|
||||
[node name="Gun_Position" type="Position2D" parent="Player"]
|
||||
position = Vector2( 37.1728, -6.00076 )
|
||||
script = ExtResource( 4 )
|
||||
BIN
Pavels/bullet_trajectory/icon.png
Normal file
BIN
Pavels/bullet_trajectory/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.2 KiB |
34
Pavels/bullet_trajectory/icon.png.import
Normal file
34
Pavels/bullet_trajectory/icon.png.import
Normal file
@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://icon.png"
|
||||
dest_files=[ "res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.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=true
|
||||
flags/mipmaps=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
||||
BIN
Pavels/bullet_trajectory/pixil-frame-0 (1).png
Normal file
BIN
Pavels/bullet_trajectory/pixil-frame-0 (1).png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 28 KiB |
34
Pavels/bullet_trajectory/pixil-frame-0 (1).png.import
Normal file
34
Pavels/bullet_trajectory/pixil-frame-0 (1).png.import
Normal file
@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/pixil-frame-0 (1).png-160dd9969d7e45d14d604c370b40e019.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://pixil-frame-0 (1).png"
|
||||
dest_files=[ "res://.import/pixil-frame-0 (1).png-160dd9969d7e45d14d604c370b40e019.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=true
|
||||
flags/mipmaps=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
||||
BIN
Pavels/bullet_trajectory/pixilart-drawing.png
Normal file
BIN
Pavels/bullet_trajectory/pixilart-drawing.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 818 B |
34
Pavels/bullet_trajectory/pixilart-drawing.png.import
Normal file
34
Pavels/bullet_trajectory/pixilart-drawing.png.import
Normal file
@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/pixilart-drawing.png-9e9c431ac86a42d1fefc4da3ac6bc15c.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://pixilart-drawing.png"
|
||||
dest_files=[ "res://.import/pixilart-drawing.png-9e9c431ac86a42d1fefc4da3ac6bc15c.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=true
|
||||
flags/mipmaps=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
||||
85
Pavels/bullet_trajectory/project.godot
Normal file
85
Pavels/bullet_trajectory/project.godot
Normal file
@ -0,0 +1,85 @@
|
||||
; Engine configuration file.
|
||||
; It's best edited using the editor UI and not directly,
|
||||
; since the parameters that go here are not all obvious.
|
||||
;
|
||||
; Format:
|
||||
; [section] ; section goes between []
|
||||
; param=value ; assign values to parameters
|
||||
|
||||
config_version=4
|
||||
|
||||
[application]
|
||||
|
||||
config/name="Bullet Trajectory"
|
||||
run/main_scene="res://game.tscn"
|
||||
config/icon="res://icon.png"
|
||||
|
||||
[input]
|
||||
|
||||
ui_left={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":65,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":14,"pressure":0.0,"pressed":false,"script":null)
|
||||
]
|
||||
}
|
||||
ui_right={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":68,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":15,"pressure":0.0,"pressed":false,"script":null)
|
||||
]
|
||||
}
|
||||
ui_up={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":87,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":12,"pressure":0.0,"pressed":false,"script":null)
|
||||
]
|
||||
}
|
||||
ui_down={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":83,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":13,"pressure":0.0,"pressed":false,"script":null)
|
||||
]
|
||||
}
|
||||
shoot={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"button_mask":0,"position":Vector2( 0, 0 ),"global_position":Vector2( 0, 0 ),"factor":1.0,"button_index":1,"pressed":false,"doubleclick":false,"script":null)
|
||||
]
|
||||
}
|
||||
gun_up={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777232,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
gun_down={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777234,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
line={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777351,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
parab={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777352,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
hyper={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777354,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
sine={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777353,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
|
||||
[physics]
|
||||
|
||||
common/enable_pause_aware_picking=true
|
||||
|
||||
[rendering]
|
||||
|
||||
environment/default_environment="res://default_env.tres"
|
||||
30
Pavels/bullet_trajectory/script/Gun.gd
Normal file
30
Pavels/bullet_trajectory/script/Gun.gd
Normal file
@ -0,0 +1,30 @@
|
||||
extends Position2D
|
||||
|
||||
var trajectories = {
|
||||
'line' : preload("res://Line_Trajectory/Line_Barrel.tscn"),
|
||||
'sine' : preload("res://Sine_Trajectory/Sine_Barrel.tscn"),
|
||||
'parab' : preload("res://Parabolic_Trajectory/Parabolic_Barrel.tscn"),
|
||||
'hyper' : preload("res://Hyperbolic_Trajectory/Hyperbolic_Barrel.tscn")
|
||||
}
|
||||
|
||||
|
||||
func equip_gun(gun_type:String):
|
||||
for gun in get_children(): #if there is gun remove it
|
||||
gun.queue_free()
|
||||
|
||||
var gun = trajectories[gun_type].instance()
|
||||
add_child(gun)
|
||||
|
||||
|
||||
|
||||
func _process(delta):
|
||||
look_at(get_global_mouse_position())
|
||||
if Input.is_action_just_pressed("line"):
|
||||
equip_gun('line')
|
||||
if Input.is_action_just_pressed("sine"):
|
||||
equip_gun('sine')
|
||||
if Input.is_action_just_pressed("parab"):
|
||||
equip_gun('parab')
|
||||
if Input.is_action_just_pressed("hyper"):
|
||||
equip_gun('hyper')
|
||||
pass
|
||||
@ -0,0 +1,16 @@
|
||||
extends StaticBody2D # Y = aX
|
||||
|
||||
onready var bullet = preload("res://Hyperbolic_Trajectory/Hyperbolic_Env.tscn")
|
||||
|
||||
|
||||
func shoot():
|
||||
var b = bullet.instance()
|
||||
get_parent().get_parent().get_parent().add_child(b)
|
||||
b.global_position = $Position2D.global_position
|
||||
b.global_rotation = $Position2D.global_rotation
|
||||
|
||||
|
||||
|
||||
func _process(delta):
|
||||
if Input.is_action_just_pressed("shoot"):
|
||||
shoot()
|
||||
@ -0,0 +1,24 @@
|
||||
extends Area2D
|
||||
|
||||
var velocity = Vector2()
|
||||
var speed = 1
|
||||
var time = 0.5
|
||||
var gravitile = 5
|
||||
|
||||
|
||||
|
||||
func follow_hyperbolic_trajectory():
|
||||
velocity.x = gravitile * time
|
||||
velocity.y = 1/time
|
||||
|
||||
|
||||
func _process(delta):
|
||||
follow_hyperbolic_trajectory()
|
||||
time += delta
|
||||
position += velocity * speed * delta
|
||||
|
||||
|
||||
func _on_Bullet_body_entered(body):
|
||||
if body.is_in_group("mobs"):
|
||||
body.queue_free()
|
||||
queue_free()
|
||||
10
Pavels/bullet_trajectory/script/Hyperbola/Hyperbolic_Env.gd
Normal file
10
Pavels/bullet_trajectory/script/Hyperbola/Hyperbolic_Env.gd
Normal file
@ -0,0 +1,10 @@
|
||||
extends Node2D
|
||||
|
||||
|
||||
var time = 0
|
||||
|
||||
|
||||
func _process(delta):
|
||||
time += delta
|
||||
if time > 17:
|
||||
queue_free()
|
||||
26
Pavels/bullet_trajectory/script/KinematicBody2D.gd
Normal file
26
Pavels/bullet_trajectory/script/KinematicBody2D.gd
Normal file
@ -0,0 +1,26 @@
|
||||
extends KinematicBody2D
|
||||
|
||||
export var speed = 400
|
||||
var movement = Vector2(0, 0)
|
||||
|
||||
#func shoot():
|
||||
#var b = env.instance()
|
||||
#get_parent().add_child(b)
|
||||
#b.global_transform = $Gun.global_transform
|
||||
|
||||
func get_input():
|
||||
movement = Vector2()
|
||||
if Input.is_action_pressed("ui_right"):
|
||||
movement.x += 10
|
||||
if Input.is_action_pressed("ui_left"):
|
||||
movement.x -= 10
|
||||
if Input.is_action_pressed("ui_down"):
|
||||
movement.y += 10
|
||||
if Input.is_action_pressed("ui_up"):
|
||||
movement.y -= 10
|
||||
#if Input.is_action_just_pressed("shoot"):
|
||||
#shoot()
|
||||
|
||||
func _physics_process(delta):
|
||||
get_input()
|
||||
position += movement.normalized() * speed * delta
|
||||
16
Pavels/bullet_trajectory/script/Line/Line_Barrel.gd
Normal file
16
Pavels/bullet_trajectory/script/Line/Line_Barrel.gd
Normal file
@ -0,0 +1,16 @@
|
||||
extends StaticBody2D # Y = aX
|
||||
|
||||
onready var bullet = preload("res://Line_Trajectory/Line_Env.tscn")
|
||||
|
||||
|
||||
func shoot():
|
||||
var b = bullet.instance()
|
||||
get_parent().get_parent().get_parent().add_child(b)
|
||||
b.global_position = $Position2D.global_position
|
||||
b.global_rotation = $Position2D.global_rotation
|
||||
|
||||
|
||||
|
||||
func _process(delta):
|
||||
if Input.is_action_just_pressed("shoot"):
|
||||
shoot()
|
||||
43
Pavels/bullet_trajectory/script/Line/Line_Bullet.gd
Normal file
43
Pavels/bullet_trajectory/script/Line/Line_Bullet.gd
Normal file
@ -0,0 +1,43 @@
|
||||
extends Area2D
|
||||
|
||||
export var speed = 100
|
||||
var velocity = Vector2()
|
||||
|
||||
var time = 0
|
||||
export var amplitude = 4
|
||||
export var frequency = 5
|
||||
var gravitile = 5
|
||||
|
||||
|
||||
func follow_line_trajectory():
|
||||
velocity = Vector2(10, 0)
|
||||
|
||||
#func follow_parabolic_trajectory():
|
||||
#velocity.x = 5
|
||||
#velocity.y = 1 * time * gravitile
|
||||
#return velocity
|
||||
|
||||
#func follow_hyperbolic_trajectory():
|
||||
#velocity.x = gravitile * time
|
||||
#velocity.y = 1
|
||||
#return velocity
|
||||
|
||||
#func input():
|
||||
#if Input.is_action_just_pressed("line"):
|
||||
#return follow_sine_trajectory()
|
||||
#elif Input.is_action_just_pressed("sine"):
|
||||
#return follow_line_trajectory()
|
||||
#else:
|
||||
#print('Trajectory is not selected')
|
||||
#queue_free()
|
||||
|
||||
func _process(delta):
|
||||
follow_line_trajectory()
|
||||
time += delta
|
||||
position += velocity * speed * delta
|
||||
|
||||
|
||||
func _on_Bullet_body_entered(body):
|
||||
if body.is_in_group("mobs"):
|
||||
body.queue_free()
|
||||
queue_free()
|
||||
9
Pavels/bullet_trajectory/script/Line/Line_Env.gd
Normal file
9
Pavels/bullet_trajectory/script/Line/Line_Env.gd
Normal file
@ -0,0 +1,9 @@
|
||||
extends Node2D
|
||||
|
||||
var time = 0
|
||||
|
||||
|
||||
func _process(delta):
|
||||
time += delta
|
||||
if time > 17:
|
||||
queue_free()
|
||||
10
Pavels/bullet_trajectory/script/Mob.gd
Normal file
10
Pavels/bullet_trajectory/script/Mob.gd
Normal file
@ -0,0 +1,10 @@
|
||||
extends KinematicBody2D
|
||||
|
||||
|
||||
var velocity = Vector2(1, 1)
|
||||
|
||||
func _process(delta):
|
||||
var collision = move_and_collide(velocity * delta)
|
||||
|
||||
|
||||
|
||||
16
Pavels/bullet_trajectory/script/Parabola/Parabolic_Barrel.gd
Normal file
16
Pavels/bullet_trajectory/script/Parabola/Parabolic_Barrel.gd
Normal file
@ -0,0 +1,16 @@
|
||||
extends StaticBody2D # Y = aX
|
||||
|
||||
onready var bullet = preload("res://Parabolic_Trajectory/Parabolic_Env.tscn")
|
||||
|
||||
|
||||
func shoot():
|
||||
var b = bullet.instance()
|
||||
get_parent().get_parent().get_parent().add_child(b)
|
||||
b.global_position = $Position2D.global_position
|
||||
b.global_rotation = $Position2D.global_rotation
|
||||
|
||||
|
||||
|
||||
func _process(delta):
|
||||
if Input.is_action_just_pressed("shoot"):
|
||||
shoot()
|
||||
24
Pavels/bullet_trajectory/script/Parabola/Parabolic_Bullet.gd
Normal file
24
Pavels/bullet_trajectory/script/Parabola/Parabolic_Bullet.gd
Normal file
@ -0,0 +1,24 @@
|
||||
extends Area2D
|
||||
|
||||
export var speed = 100
|
||||
var velocity = Vector2()
|
||||
|
||||
var time = 0
|
||||
var gravitile = 5
|
||||
|
||||
|
||||
func follow_parabolic_trajectory():
|
||||
velocity.x = 5
|
||||
velocity.y = 1 * time * gravitile
|
||||
|
||||
|
||||
func _process(delta):
|
||||
follow_parabolic_trajectory()
|
||||
time += delta
|
||||
position += velocity * speed * delta
|
||||
|
||||
|
||||
func _on_Bullet_body_entered(body):
|
||||
if body.is_in_group("mobs"):
|
||||
body.queue_free()
|
||||
queue_free()
|
||||
@ -0,0 +1,9 @@
|
||||
extends Node2D
|
||||
|
||||
var time = 0
|
||||
|
||||
|
||||
func _process(delta):
|
||||
time += delta
|
||||
if time > 17:
|
||||
queue_free()
|
||||
20
Pavels/bullet_trajectory/script/Sine/Sine_Barrel.gd
Normal file
20
Pavels/bullet_trajectory/script/Sine/Sine_Barrel.gd
Normal file
@ -0,0 +1,20 @@
|
||||
extends StaticBody2D
|
||||
|
||||
onready var bullet = preload("res://Sine_Trajectory/Sine_Env.tscn")
|
||||
|
||||
var velocity = Vector2(1, 0)
|
||||
var shooting_speed = 200
|
||||
|
||||
|
||||
|
||||
func shoot():
|
||||
var b = bullet.instance()
|
||||
get_parent().get_parent().get_parent().add_child(b)
|
||||
b.global_position = $Position2D.global_position
|
||||
b.global_rotation = $Position2D.global_rotation
|
||||
pass
|
||||
|
||||
|
||||
func _process(delta):
|
||||
if Input.is_action_just_pressed("shoot"):
|
||||
shoot()
|
||||
25
Pavels/bullet_trajectory/script/Sine/Sine_Bullet.gd
Normal file
25
Pavels/bullet_trajectory/script/Sine/Sine_Bullet.gd
Normal file
@ -0,0 +1,25 @@
|
||||
extends Area2D
|
||||
|
||||
export var speed = 100
|
||||
var velocity = Vector2()
|
||||
|
||||
var time = 0
|
||||
export var amplitude = 4
|
||||
export var frequency = 5
|
||||
var gravitile = 5
|
||||
|
||||
|
||||
func follow_sine_trajectory():
|
||||
velocity.y = amplitude * cos(time * frequency)
|
||||
velocity.x = 5
|
||||
|
||||
func _process(delta):
|
||||
follow_sine_trajectory()
|
||||
time += delta
|
||||
position += velocity * speed * delta
|
||||
|
||||
|
||||
func _on_Bullet_body_entered(body):
|
||||
if body.is_in_group("mobs"):
|
||||
body.queue_free()
|
||||
queue_free()
|
||||
9
Pavels/bullet_trajectory/script/Sine/Sine_Env.gd
Normal file
9
Pavels/bullet_trajectory/script/Sine/Sine_Env.gd
Normal file
@ -0,0 +1,9 @@
|
||||
extends Node2D
|
||||
|
||||
var time = 0
|
||||
|
||||
|
||||
func _process(delta):
|
||||
time += delta
|
||||
if time > 17:
|
||||
queue_free()
|
||||
@ -37,42 +37,42 @@ fps=false
|
||||
|
||||
input_right={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":68,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777233,"unicode":0,"echo":false,"script":null)
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":68,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777233,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
input_left={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":65,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777231,"unicode":0,"echo":false,"script":null)
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":65,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777231,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
input_up={
|
||||
"deadzone": 0.49,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":87,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777232,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":32,"unicode":0,"echo":false,"script":null)
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":87,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777232,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":32,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
input_down={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":83,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777234,"unicode":0,"echo":false,"script":null)
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":83,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777234,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
input_debug={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":96,"unicode":0,"echo":false,"script":null)
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":96,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
input_enter={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777221,"unicode":0,"echo":false,"script":null)
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777221,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
input_shift={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777237,"unicode":0,"echo":false,"script":null)
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777237,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
input_shoot={
|
||||
@ -82,17 +82,37 @@ input_shoot={
|
||||
}
|
||||
esc={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777217,"unicode":0,"echo":false,"script":null)
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777217,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
rotation_increase={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":69,"unicode":0,"echo":false,"script":null)
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":69,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
rotation_decrease={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":81,"unicode":0,"echo":false,"script":null)
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":81,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
line={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777351,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
sine={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777352,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
hyper={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777353,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
parab={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777354,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
@ -67,9 +67,23 @@ var weaponAngle = 0
|
||||
var particleTexture = ImageTexture.new()
|
||||
var particleImage = Image.new()
|
||||
|
||||
func _ready():
|
||||
weaponPositionalOffset = Vector2(-$"weaponHolder/Player-character-theme-gun-na".texture.get_width() * $"weaponHolder/Player-character-theme-gun-na".scale.x / 2,-$"weaponHolder/Player-character-theme-gun-na".texture.get_height() * $"weaponHolder/Player-character-theme-gun-na".scale.y / 2) + Vector2(-$weaponHolder.get_shape().get_radius(), 0)
|
||||
func equip_weapon():
|
||||
if Input.is_action_just_pressed("line"):
|
||||
weaponPositionalOffset = Vector2(-$"weaponHolder/Player-character-theme-gun-na1".texture.get_width() * $"weaponHolder/Player-character-theme-gun-na1".scale.x / 2,-$"weaponHolder/Player-character-theme-gun-na1".texture.get_height() * $"weaponHolder/Player-character-theme-gun-na1".scale.y / 2) + Vector2(-$weaponHolder.get_shape().get_radius(), 0)
|
||||
if Input.is_action_just_pressed("sine"):
|
||||
weaponPositionalOffset = Vector2(-$"weaponHolder/Player-character-theme-gun-na2".texture.get_width() * $"weaponHolder/Player-character-theme-gun-na2".scale.x / 2,-$"weaponHolder/Player-character-theme-gun-na2".texture.get_height() * $"weaponHolder/Player-character-theme-gun-na2".scale.y / 2) + Vector2(-$weaponHolder.get_shape().get_radius(), 0)
|
||||
if Input.is_action_just_pressed("parab"):
|
||||
weaponPositionalOffset = Vector2(-$"weaponHolder/Player-character-theme-gun-na3".texture.get_width() * $"weaponHolder/Player-character-theme-gun-na3".scale.x / 2,-$"weaponHolder/Player-character-theme-gun-na3".texture.get_height() * $"weaponHolder/Player-character-theme-gun-na3".scale.y / 2) + Vector2(-$weaponHolder.get_shape().get_radius(), 0)
|
||||
if Input.is_action_just_pressed("hyper"):
|
||||
weaponPositionalOffset = Vector2(-$"weaponHolder/Player-character-theme-gun-na4".texture.get_width() * $"weaponHolder/Player-character-theme-gun-na4".scale.x / 2,-$"weaponHolder/Player-character-theme-gun-na4".texture.get_height() * $"weaponHolder/Player-character-theme-gun-na4".scale.y / 2) + Vector2(-$weaponHolder.get_shape().get_radius(), 0)
|
||||
$"weaponHolder/Player-character-theme-gun".position = weaponPositionalOffset
|
||||
return weaponPositionalOffset
|
||||
pass
|
||||
|
||||
|
||||
func _ready():
|
||||
#weaponPositionalOffset = Vector2(-$"weaponHolder/Player-character-theme-gun-na3".texture.get_width() * $"weaponHolder/Player-character-theme-gun-na3".scale.x / 2,-$"weaponHolder/Player-character-theme-gun-na3".texture.get_height() * $"weaponHolder/Player-character-theme-gun-na3".scale.y / 2) + Vector2(-$weaponHolder.get_shape().get_radius(), 0)
|
||||
#$"weaponHolder/Player-character-theme-gun".position = weaponPositionalOffset
|
||||
get_tree().connect("network_peer_connected", self, "_network_peer_connected")
|
||||
username_text_instance = Global.instance_node_at_location(username_text, PersistentNodes, global_position)
|
||||
username_text_instance.player_following = self
|
||||
@ -125,8 +139,8 @@ func process_rotation():
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
$"weaponHolder/Player-character-theme-gun".play(theme)
|
||||
particleImage.load("res://source/assets/sprites/character/player/theme/" + theme + "/na/Player-character-theme-particle-"+theme+".png")
|
||||
particleTexture.create_from_image(particleImage)
|
||||
#particleImage.load("res://source/assets/sprites/character/player/theme/" + theme + "/na/Player-character-theme-particle-"+theme+".png")
|
||||
#particleTexture.create_from_image(particleImage)
|
||||
$Particles2D.texture = particleTexture
|
||||
if username_text_instance != null:
|
||||
username_text_instance.name = "username" + name
|
||||
@ -159,6 +173,7 @@ func _process(delta: float) -> void:
|
||||
VDIR[v_t][v]["ray"]["collided"] = false
|
||||
update()
|
||||
process_rotation()
|
||||
equip_weapon()
|
||||
|
||||
|
||||
func _physics_process(delta) -> void:
|
||||
@ -219,7 +234,7 @@ func _physics_process(delta) -> void:
|
||||
$player_animated_sprite.play("boost-speed-"+direction+"-"+theme)
|
||||
$Particles2D.set_emitting(true)
|
||||
else:
|
||||
$player_animated_sprite.play("idle-speed-"+direction+"-"+theme)
|
||||
#$player_animated_sprite.play("idle-speed-"+direction+"-"+theme)
|
||||
$Particles2D.set_emitting(false)
|
||||
if not characterStates["onGround"]:
|
||||
velocityVDIR.y += accelerationSpeed
|
||||
|
||||
@ -174,111 +174,6 @@
|
||||
|
||||
[sub_resource type="SpriteFrames" id=2]
|
||||
animations = [ {
|
||||
"frames": [ ExtResource( 114 ), ExtResource( 128 ), ExtResource( 93 ), ExtResource( 107 ), ExtResource( 117 ), ExtResource( 102 ), ExtResource( 81 ), ExtResource( 118 ), ExtResource( 76 ), ExtResource( 115 ), ExtResource( 127 ), ExtResource( 123 ), ExtResource( 113 ), ExtResource( 77 ), ExtResource( 78 ), ExtResource( 124 ), ExtResource( 94 ), ExtResource( 112 ), ExtResource( 131 ), ExtResource( 95 ) ],
|
||||
"loop": true,
|
||||
"name": "boost-speed-right-03",
|
||||
"speed": 50.0
|
||||
}, {
|
||||
"frames": [ ExtResource( 70 ), ExtResource( 49 ), ExtResource( 74 ), ExtResource( 75 ), ExtResource( 28 ), ExtResource( 52 ), ExtResource( 53 ), ExtResource( 55 ), ExtResource( 150 ), ExtResource( 156 ), ExtResource( 138 ), ExtResource( 161 ), ExtResource( 145 ), ExtResource( 148 ), ExtResource( 147 ), ExtResource( 133 ), ExtResource( 164 ), ExtResource( 134 ), ExtResource( 152 ), ExtResource( 160 ) ],
|
||||
"loop": true,
|
||||
"name": "move-speed-left-03",
|
||||
"speed": 35.0
|
||||
}, {
|
||||
"frames": [ ExtResource( 5 ), ExtResource( 42 ), ExtResource( 35 ), ExtResource( 24 ), ExtResource( 8 ), ExtResource( 31 ), ExtResource( 30 ), ExtResource( 38 ), ExtResource( 10 ), ExtResource( 43 ), ExtResource( 41 ), ExtResource( 33 ), ExtResource( 44 ), ExtResource( 19 ), ExtResource( 29 ), ExtResource( 25 ), ExtResource( 36 ), ExtResource( 12 ), ExtResource( 45 ), ExtResource( 21 ) ],
|
||||
"loop": true,
|
||||
"name": "move-speed-right-01",
|
||||
"speed": 35.0
|
||||
}, {
|
||||
"frames": [ ExtResource( 167 ), ExtResource( 157 ), ExtResource( 158 ), ExtResource( 126 ), ExtResource( 90 ), ExtResource( 89 ), ExtResource( 97 ), ExtResource( 88 ), ExtResource( 98 ), ExtResource( 91 ), ExtResource( 125 ), ExtResource( 105 ), ExtResource( 82 ), ExtResource( 84 ), ExtResource( 92 ), ExtResource( 103 ), ExtResource( 122 ), ExtResource( 130 ), ExtResource( 104 ), ExtResource( 116 ) ],
|
||||
"loop": true,
|
||||
"name": "boost-speed-right-02",
|
||||
"speed": 50.0
|
||||
}, {
|
||||
"frames": [ ExtResource( 167 ), ExtResource( 157 ), ExtResource( 158 ), ExtResource( 126 ), ExtResource( 90 ), ExtResource( 89 ), ExtResource( 97 ), ExtResource( 88 ), ExtResource( 98 ), ExtResource( 91 ), ExtResource( 125 ), ExtResource( 105 ), ExtResource( 82 ), ExtResource( 84 ), ExtResource( 92 ), ExtResource( 103 ), ExtResource( 122 ), ExtResource( 130 ), ExtResource( 104 ), ExtResource( 116 ) ],
|
||||
"loop": true,
|
||||
"name": "boost-speed-right-02",
|
||||
"speed": 50.0
|
||||
}, {
|
||||
"frames": [ ExtResource( 48 ), ExtResource( 4 ), ExtResource( 3 ), ExtResource( 46 ), ExtResource( 47 ), ExtResource( 32 ), ExtResource( 13 ), ExtResource( 40 ), ExtResource( 6 ), ExtResource( 15 ), ExtResource( 22 ), ExtResource( 14 ), ExtResource( 9 ), ExtResource( 37 ), ExtResource( 23 ), ExtResource( 39 ), ExtResource( 20 ), ExtResource( 18 ), ExtResource( 7 ), ExtResource( 34 ) ],
|
||||
"loop": true,
|
||||
"name": "move-speed-left-01",
|
||||
"speed": 35.0
|
||||
}, {
|
||||
"frames": [ ExtResource( 70 ), ExtResource( 49 ), ExtResource( 74 ), ExtResource( 75 ), ExtResource( 28 ), ExtResource( 52 ), ExtResource( 53 ), ExtResource( 55 ), ExtResource( 150 ), ExtResource( 156 ), ExtResource( 138 ), ExtResource( 161 ), ExtResource( 145 ), ExtResource( 148 ), ExtResource( 147 ), ExtResource( 133 ), ExtResource( 164 ), ExtResource( 134 ), ExtResource( 152 ), ExtResource( 160 ) ],
|
||||
"loop": true,
|
||||
"name": "boost-speed-left-03",
|
||||
"speed": 50.0
|
||||
}, {
|
||||
"frames": [ ExtResource( 99 ), ExtResource( 83 ), ExtResource( 109 ), ExtResource( 111 ), ExtResource( 101 ), ExtResource( 96 ), ExtResource( 79 ), ExtResource( 132 ), ExtResource( 119 ), ExtResource( 80 ), ExtResource( 85 ), ExtResource( 86 ), ExtResource( 87 ), ExtResource( 106 ), ExtResource( 121 ), ExtResource( 129 ), ExtResource( 100 ), ExtResource( 108 ), ExtResource( 110 ), ExtResource( 120 ) ],
|
||||
"loop": true,
|
||||
"name": "idle-speed-right-04",
|
||||
"speed": 25.0
|
||||
}, {
|
||||
"frames": [ ExtResource( 5 ), ExtResource( 42 ), ExtResource( 35 ), ExtResource( 24 ), ExtResource( 8 ), ExtResource( 31 ), ExtResource( 30 ), ExtResource( 38 ), ExtResource( 10 ), ExtResource( 43 ), ExtResource( 41 ), ExtResource( 33 ), ExtResource( 44 ), ExtResource( 19 ), ExtResource( 29 ), ExtResource( 25 ), ExtResource( 36 ), ExtResource( 12 ), ExtResource( 45 ), ExtResource( 21 ) ],
|
||||
"loop": true,
|
||||
"name": "idle-speed-right-01",
|
||||
"speed": 25.0
|
||||
}, {
|
||||
"frames": [ ExtResource( 5 ), ExtResource( 42 ), ExtResource( 35 ), ExtResource( 24 ), ExtResource( 8 ), ExtResource( 31 ), ExtResource( 30 ), ExtResource( 38 ), ExtResource( 10 ), ExtResource( 43 ), ExtResource( 41 ), ExtResource( 33 ), ExtResource( 44 ), ExtResource( 19 ), ExtResource( 29 ), ExtResource( 25 ), ExtResource( 36 ), ExtResource( 12 ), ExtResource( 45 ), ExtResource( 21 ) ],
|
||||
"loop": true,
|
||||
"name": "idle-speed-right-01",
|
||||
"speed": 25.0
|
||||
}, {
|
||||
"frames": [ ExtResource( 167 ), ExtResource( 157 ), ExtResource( 158 ), ExtResource( 126 ), ExtResource( 90 ), ExtResource( 89 ), ExtResource( 97 ), ExtResource( 88 ), ExtResource( 98 ), ExtResource( 91 ), ExtResource( 125 ), ExtResource( 105 ), ExtResource( 82 ), ExtResource( 84 ), ExtResource( 92 ), ExtResource( 103 ), ExtResource( 122 ), ExtResource( 130 ), ExtResource( 104 ), ExtResource( 116 ) ],
|
||||
"loop": true,
|
||||
"name": "idle-speed-right-02",
|
||||
"speed": 25.0
|
||||
}, {
|
||||
"frames": [ ExtResource( 70 ), ExtResource( 49 ), ExtResource( 74 ), ExtResource( 75 ), ExtResource( 28 ), ExtResource( 52 ), ExtResource( 53 ), ExtResource( 55 ), ExtResource( 150 ), ExtResource( 156 ), ExtResource( 138 ), ExtResource( 161 ), ExtResource( 145 ), ExtResource( 148 ), ExtResource( 147 ), ExtResource( 133 ), ExtResource( 164 ), ExtResource( 134 ), ExtResource( 152 ), ExtResource( 160 ) ],
|
||||
"loop": true,
|
||||
"name": "boost-speed-left-03",
|
||||
"speed": 50.0
|
||||
}, {
|
||||
"frames": [ ExtResource( 162 ), ExtResource( 135 ), ExtResource( 146 ), ExtResource( 141 ), ExtResource( 143 ), ExtResource( 163 ), ExtResource( 149 ), ExtResource( 136 ), ExtResource( 154 ), ExtResource( 137 ), ExtResource( 165 ), ExtResource( 142 ), ExtResource( 139 ), ExtResource( 159 ), ExtResource( 140 ), ExtResource( 155 ), ExtResource( 144 ), ExtResource( 151 ), ExtResource( 153 ), ExtResource( 166 ) ],
|
||||
"loop": true,
|
||||
"name": "move-speed-left-04",
|
||||
"speed": 35.0
|
||||
}, {
|
||||
"frames": [ ExtResource( 99 ), ExtResource( 83 ), ExtResource( 109 ), ExtResource( 111 ), ExtResource( 101 ), ExtResource( 96 ), ExtResource( 79 ), ExtResource( 132 ), ExtResource( 119 ), ExtResource( 80 ), ExtResource( 85 ), ExtResource( 86 ), ExtResource( 87 ), ExtResource( 106 ), ExtResource( 121 ), ExtResource( 129 ), ExtResource( 100 ), ExtResource( 108 ), ExtResource( 110 ), ExtResource( 120 ) ],
|
||||
"loop": true,
|
||||
"name": "move-speed-right-04",
|
||||
"speed": 35.0
|
||||
}, {
|
||||
"frames": [ ExtResource( 48 ), ExtResource( 4 ), ExtResource( 3 ), ExtResource( 46 ), ExtResource( 47 ), ExtResource( 32 ), ExtResource( 13 ), ExtResource( 40 ), ExtResource( 6 ), ExtResource( 15 ), ExtResource( 22 ), ExtResource( 14 ), ExtResource( 9 ), ExtResource( 37 ), ExtResource( 23 ), ExtResource( 39 ), ExtResource( 20 ), ExtResource( 18 ), ExtResource( 7 ), ExtResource( 34 ) ],
|
||||
"loop": true,
|
||||
"name": "idle-speed-left-01",
|
||||
"speed": 25.0
|
||||
}, {
|
||||
"frames": [ ExtResource( 99 ), ExtResource( 83 ), ExtResource( 109 ), ExtResource( 111 ), ExtResource( 101 ), ExtResource( 96 ), ExtResource( 79 ), ExtResource( 132 ), ExtResource( 119 ), ExtResource( 80 ), ExtResource( 85 ), ExtResource( 86 ), ExtResource( 87 ), ExtResource( 106 ), ExtResource( 121 ), ExtResource( 129 ), ExtResource( 100 ), ExtResource( 108 ), ExtResource( 110 ), ExtResource( 120 ) ],
|
||||
"loop": true,
|
||||
"name": "boost-speed-right-04",
|
||||
"speed": 50.0
|
||||
}, {
|
||||
"frames": [ ExtResource( 162 ), ExtResource( 135 ), ExtResource( 146 ), ExtResource( 141 ), ExtResource( 143 ), ExtResource( 163 ), ExtResource( 149 ), ExtResource( 136 ), ExtResource( 154 ), ExtResource( 137 ), ExtResource( 165 ), ExtResource( 142 ), ExtResource( 139 ), ExtResource( 159 ), ExtResource( 140 ), ExtResource( 155 ), ExtResource( 144 ), ExtResource( 151 ), ExtResource( 153 ), ExtResource( 166 ) ],
|
||||
"loop": true,
|
||||
"name": "idle-speed-left-04",
|
||||
"speed": 25.0
|
||||
}, {
|
||||
"frames": [ ExtResource( 162 ), ExtResource( 135 ), ExtResource( 146 ), ExtResource( 141 ), ExtResource( 143 ), ExtResource( 163 ), ExtResource( 149 ), ExtResource( 136 ), ExtResource( 154 ), ExtResource( 137 ), ExtResource( 165 ), ExtResource( 142 ), ExtResource( 139 ), ExtResource( 159 ), ExtResource( 140 ), ExtResource( 155 ), ExtResource( 144 ), ExtResource( 151 ), ExtResource( 153 ), ExtResource( 166 ) ],
|
||||
"loop": true,
|
||||
"name": "boost-speed-left-04",
|
||||
"speed": 50.0
|
||||
}, {
|
||||
"frames": [ ExtResource( 73 ), ExtResource( 57 ), ExtResource( 65 ), ExtResource( 64 ), ExtResource( 54 ), ExtResource( 71 ), ExtResource( 58 ), ExtResource( 66 ), ExtResource( 62 ), ExtResource( 59 ), ExtResource( 56 ), ExtResource( 60 ), ExtResource( 63 ), ExtResource( 50 ), ExtResource( 61 ), ExtResource( 67 ), ExtResource( 72 ), ExtResource( 51 ), ExtResource( 68 ), ExtResource( 69 ) ],
|
||||
"loop": true,
|
||||
"name": "move-speed-left-02",
|
||||
"speed": 35.0
|
||||
}, {
|
||||
"frames": [ ExtResource( 167 ), ExtResource( 157 ), ExtResource( 158 ), ExtResource( 126 ), ExtResource( 90 ), ExtResource( 89 ), ExtResource( 97 ), ExtResource( 88 ), ExtResource( 98 ), ExtResource( 91 ), ExtResource( 125 ), ExtResource( 105 ), ExtResource( 82 ), ExtResource( 84 ), ExtResource( 92 ), ExtResource( 103 ), ExtResource( 122 ), ExtResource( 130 ), ExtResource( 104 ), ExtResource( 116 ) ],
|
||||
"loop": true,
|
||||
"name": "move-speed-right-02",
|
||||
"speed": 35.0
|
||||
}, {
|
||||
"frames": [ ExtResource( 114 ), ExtResource( 128 ), ExtResource( 93 ), ExtResource( 107 ), ExtResource( 117 ), ExtResource( 102 ), ExtResource( 81 ), ExtResource( 118 ), ExtResource( 76 ), ExtResource( 115 ), ExtResource( 127 ), ExtResource( 123 ), ExtResource( 113 ), ExtResource( 77 ), ExtResource( 78 ), ExtResource( 124 ), ExtResource( 94 ), ExtResource( 112 ), ExtResource( 131 ), ExtResource( 95 ) ],
|
||||
"loop": true,
|
||||
"name": "move-speed-right-03",
|
||||
"speed": 35.0
|
||||
}, {
|
||||
"frames": [ ExtResource( 48 ), ExtResource( 4 ), ExtResource( 3 ), ExtResource( 46 ), ExtResource( 47 ), ExtResource( 32 ), ExtResource( 13 ), ExtResource( 40 ), ExtResource( 6 ), ExtResource( 15 ), ExtResource( 22 ), ExtResource( 14 ), ExtResource( 9 ), ExtResource( 37 ), ExtResource( 23 ), ExtResource( 39 ), ExtResource( 20 ), ExtResource( 18 ), ExtResource( 7 ), ExtResource( 34 ) ],
|
||||
"loop": true,
|
||||
"name": "boost-speed-left-01",
|
||||
@ -291,8 +186,98 @@ animations = [ {
|
||||
}, {
|
||||
"frames": [ ExtResource( 73 ), ExtResource( 57 ), ExtResource( 65 ), ExtResource( 64 ), ExtResource( 54 ), ExtResource( 71 ), ExtResource( 58 ), ExtResource( 66 ), ExtResource( 62 ), ExtResource( 59 ), ExtResource( 56 ), ExtResource( 60 ), ExtResource( 63 ), ExtResource( 50 ), ExtResource( 61 ), ExtResource( 67 ), ExtResource( 72 ), ExtResource( 51 ), ExtResource( 68 ), ExtResource( 69 ) ],
|
||||
"loop": true,
|
||||
"name": "move-speed-left-02",
|
||||
"speed": 35.0
|
||||
}, {
|
||||
"frames": [ ExtResource( 167 ), ExtResource( 157 ), ExtResource( 158 ), ExtResource( 126 ), ExtResource( 90 ), ExtResource( 89 ), ExtResource( 97 ), ExtResource( 88 ), ExtResource( 98 ), ExtResource( 91 ), ExtResource( 125 ), ExtResource( 105 ), ExtResource( 82 ), ExtResource( 84 ), ExtResource( 92 ), ExtResource( 103 ), ExtResource( 122 ), ExtResource( 130 ), ExtResource( 104 ), ExtResource( 116 ) ],
|
||||
"loop": true,
|
||||
"name": "move-speed-right-02",
|
||||
"speed": 35.0
|
||||
}, {
|
||||
"frames": [ ExtResource( 162 ), ExtResource( 135 ), ExtResource( 146 ), ExtResource( 141 ), ExtResource( 143 ), ExtResource( 163 ), ExtResource( 149 ), ExtResource( 136 ), ExtResource( 154 ), ExtResource( 137 ), ExtResource( 165 ), ExtResource( 142 ), ExtResource( 139 ), ExtResource( 159 ), ExtResource( 140 ), ExtResource( 155 ), ExtResource( 144 ), ExtResource( 151 ), ExtResource( 153 ), ExtResource( 166 ) ],
|
||||
"loop": true,
|
||||
"name": "move-speed-left-04",
|
||||
"speed": 35.0
|
||||
}, {
|
||||
"frames": [ ExtResource( 167 ), ExtResource( 157 ), ExtResource( 158 ), ExtResource( 126 ), ExtResource( 90 ), ExtResource( 89 ), ExtResource( 97 ), ExtResource( 88 ), ExtResource( 98 ), ExtResource( 91 ), ExtResource( 125 ), ExtResource( 105 ), ExtResource( 82 ), ExtResource( 84 ), ExtResource( 92 ), ExtResource( 103 ), ExtResource( 122 ), ExtResource( 130 ), ExtResource( 104 ), ExtResource( 116 ) ],
|
||||
"loop": true,
|
||||
"name": "idle-speed-right-02",
|
||||
"speed": 25.0
|
||||
}, {
|
||||
"frames": [ ExtResource( 162 ), ExtResource( 135 ), ExtResource( 146 ), ExtResource( 141 ), ExtResource( 143 ), ExtResource( 163 ), ExtResource( 149 ), ExtResource( 136 ), ExtResource( 154 ), ExtResource( 137 ), ExtResource( 165 ), ExtResource( 142 ), ExtResource( 139 ), ExtResource( 159 ), ExtResource( 140 ), ExtResource( 155 ), ExtResource( 144 ), ExtResource( 151 ), ExtResource( 153 ), ExtResource( 166 ) ],
|
||||
"loop": true,
|
||||
"name": "idle-speed-left-04",
|
||||
"speed": 25.0
|
||||
}, {
|
||||
"frames": [ ExtResource( 70 ), ExtResource( 49 ), ExtResource( 74 ), ExtResource( 75 ), ExtResource( 28 ), ExtResource( 52 ), ExtResource( 53 ), ExtResource( 55 ), ExtResource( 150 ), ExtResource( 156 ), ExtResource( 138 ), ExtResource( 161 ), ExtResource( 145 ), ExtResource( 148 ), ExtResource( 147 ), ExtResource( 133 ), ExtResource( 164 ), ExtResource( 134 ), ExtResource( 152 ), ExtResource( 160 ) ],
|
||||
"loop": true,
|
||||
"name": "boost-speed-left-03",
|
||||
"speed": 50.0
|
||||
}, {
|
||||
"frames": [ ExtResource( 162 ), ExtResource( 135 ), ExtResource( 146 ), ExtResource( 141 ), ExtResource( 143 ), ExtResource( 163 ), ExtResource( 149 ), ExtResource( 136 ), ExtResource( 154 ), ExtResource( 137 ), ExtResource( 165 ), ExtResource( 142 ), ExtResource( 139 ), ExtResource( 159 ), ExtResource( 140 ), ExtResource( 155 ), ExtResource( 144 ), ExtResource( 151 ), ExtResource( 153 ), ExtResource( 166 ) ],
|
||||
"loop": true,
|
||||
"name": "boost-speed-left-04",
|
||||
"speed": 50.0
|
||||
}, {
|
||||
"frames": [ ExtResource( 5 ), ExtResource( 42 ), ExtResource( 35 ), ExtResource( 24 ), ExtResource( 8 ), ExtResource( 31 ), ExtResource( 30 ), ExtResource( 38 ), ExtResource( 10 ), ExtResource( 43 ), ExtResource( 41 ), ExtResource( 33 ), ExtResource( 44 ), ExtResource( 19 ), ExtResource( 29 ), ExtResource( 25 ), ExtResource( 36 ), ExtResource( 12 ), ExtResource( 45 ), ExtResource( 21 ) ],
|
||||
"loop": true,
|
||||
"name": "idle-speed-right-01",
|
||||
"speed": 25.0
|
||||
}, {
|
||||
"frames": [ ExtResource( 48 ), ExtResource( 4 ), ExtResource( 3 ), ExtResource( 46 ), ExtResource( 47 ), ExtResource( 32 ), ExtResource( 13 ), ExtResource( 40 ), ExtResource( 6 ), ExtResource( 15 ), ExtResource( 22 ), ExtResource( 14 ), ExtResource( 9 ), ExtResource( 37 ), ExtResource( 23 ), ExtResource( 39 ), ExtResource( 20 ), ExtResource( 18 ), ExtResource( 7 ), ExtResource( 34 ) ],
|
||||
"loop": true,
|
||||
"name": "idle-speed-left-01",
|
||||
"speed": 25.0
|
||||
}, {
|
||||
"frames": [ ExtResource( 99 ), ExtResource( 83 ), ExtResource( 109 ), ExtResource( 111 ), ExtResource( 101 ), ExtResource( 96 ), ExtResource( 79 ), ExtResource( 132 ), ExtResource( 119 ), ExtResource( 80 ), ExtResource( 85 ), ExtResource( 86 ), ExtResource( 87 ), ExtResource( 106 ), ExtResource( 121 ), ExtResource( 129 ), ExtResource( 100 ), ExtResource( 108 ), ExtResource( 110 ), ExtResource( 120 ) ],
|
||||
"loop": true,
|
||||
"name": "idle-speed-right-04",
|
||||
"speed": 25.0
|
||||
}, {
|
||||
"frames": [ ExtResource( 5 ), ExtResource( 42 ), ExtResource( 35 ), ExtResource( 24 ), ExtResource( 8 ), ExtResource( 31 ), ExtResource( 30 ), ExtResource( 38 ), ExtResource( 10 ), ExtResource( 43 ), ExtResource( 41 ), ExtResource( 33 ), ExtResource( 44 ), ExtResource( 19 ), ExtResource( 29 ), ExtResource( 25 ), ExtResource( 36 ), ExtResource( 12 ), ExtResource( 45 ), ExtResource( 21 ) ],
|
||||
"loop": true,
|
||||
"name": "move-speed-right-01",
|
||||
"speed": 35.0
|
||||
}, {
|
||||
"frames": [ ExtResource( 48 ), ExtResource( 4 ), ExtResource( 3 ), ExtResource( 46 ), ExtResource( 47 ), ExtResource( 32 ), ExtResource( 13 ), ExtResource( 40 ), ExtResource( 6 ), ExtResource( 15 ), ExtResource( 22 ), ExtResource( 14 ), ExtResource( 9 ), ExtResource( 37 ), ExtResource( 23 ), ExtResource( 39 ), ExtResource( 20 ), ExtResource( 18 ), ExtResource( 7 ), ExtResource( 34 ) ],
|
||||
"loop": true,
|
||||
"name": "move-speed-left-01",
|
||||
"speed": 35.0
|
||||
}, {
|
||||
"frames": [ ExtResource( 73 ), ExtResource( 57 ), ExtResource( 65 ), ExtResource( 64 ), ExtResource( 54 ), ExtResource( 71 ), ExtResource( 58 ), ExtResource( 66 ), ExtResource( 62 ), ExtResource( 59 ), ExtResource( 56 ), ExtResource( 60 ), ExtResource( 63 ), ExtResource( 50 ), ExtResource( 61 ), ExtResource( 67 ), ExtResource( 72 ), ExtResource( 51 ), ExtResource( 68 ), ExtResource( 69 ) ],
|
||||
"loop": true,
|
||||
"name": "idle-speed-left-02",
|
||||
"speed": 25.0
|
||||
}, {
|
||||
"frames": [ ExtResource( 70 ), ExtResource( 49 ), ExtResource( 74 ), ExtResource( 75 ), ExtResource( 28 ), ExtResource( 52 ), ExtResource( 53 ), ExtResource( 55 ), ExtResource( 150 ), ExtResource( 156 ), ExtResource( 138 ), ExtResource( 161 ), ExtResource( 145 ), ExtResource( 148 ), ExtResource( 147 ), ExtResource( 133 ), ExtResource( 164 ), ExtResource( 134 ), ExtResource( 152 ), ExtResource( 160 ) ],
|
||||
"loop": true,
|
||||
"name": "move-speed-left-03",
|
||||
"speed": 35.0
|
||||
}, {
|
||||
"frames": [ ExtResource( 99 ), ExtResource( 83 ), ExtResource( 109 ), ExtResource( 111 ), ExtResource( 101 ), ExtResource( 96 ), ExtResource( 79 ), ExtResource( 132 ), ExtResource( 119 ), ExtResource( 80 ), ExtResource( 85 ), ExtResource( 86 ), ExtResource( 87 ), ExtResource( 106 ), ExtResource( 121 ), ExtResource( 129 ), ExtResource( 100 ), ExtResource( 108 ), ExtResource( 110 ), ExtResource( 120 ) ],
|
||||
"loop": true,
|
||||
"name": "boost-speed-right-04",
|
||||
"speed": 50.0
|
||||
}, {
|
||||
"frames": [ ExtResource( 114 ), ExtResource( 128 ), ExtResource( 93 ), ExtResource( 107 ), ExtResource( 117 ), ExtResource( 102 ), ExtResource( 81 ), ExtResource( 118 ), ExtResource( 76 ), ExtResource( 115 ), ExtResource( 127 ), ExtResource( 123 ), ExtResource( 113 ), ExtResource( 77 ), ExtResource( 78 ), ExtResource( 124 ), ExtResource( 94 ), ExtResource( 112 ), ExtResource( 131 ), ExtResource( 95 ) ],
|
||||
"loop": true,
|
||||
"name": "move-speed-right-03",
|
||||
"speed": 35.0
|
||||
}, {
|
||||
"frames": [ ExtResource( 114 ), ExtResource( 128 ), ExtResource( 93 ), ExtResource( 107 ), ExtResource( 117 ), ExtResource( 102 ), ExtResource( 81 ), ExtResource( 118 ), ExtResource( 76 ), ExtResource( 115 ), ExtResource( 127 ), ExtResource( 123 ), ExtResource( 113 ), ExtResource( 77 ), ExtResource( 78 ), ExtResource( 124 ), ExtResource( 94 ), ExtResource( 112 ), ExtResource( 131 ), ExtResource( 95 ) ],
|
||||
"loop": true,
|
||||
"name": "boost-speed-right-03",
|
||||
"speed": 50.0
|
||||
}, {
|
||||
"frames": [ ExtResource( 167 ), ExtResource( 157 ), ExtResource( 158 ), ExtResource( 126 ), ExtResource( 90 ), ExtResource( 89 ), ExtResource( 97 ), ExtResource( 88 ), ExtResource( 98 ), ExtResource( 91 ), ExtResource( 125 ), ExtResource( 105 ), ExtResource( 82 ), ExtResource( 84 ), ExtResource( 92 ), ExtResource( 103 ), ExtResource( 122 ), ExtResource( 130 ), ExtResource( 104 ), ExtResource( 116 ) ],
|
||||
"loop": true,
|
||||
"name": "boost-speed-right-02",
|
||||
"speed": 50.0
|
||||
}, {
|
||||
"frames": [ ExtResource( 99 ), ExtResource( 83 ), ExtResource( 109 ), ExtResource( 111 ), ExtResource( 101 ), ExtResource( 96 ), ExtResource( 79 ), ExtResource( 132 ), ExtResource( 119 ), ExtResource( 80 ), ExtResource( 85 ), ExtResource( 86 ), ExtResource( 87 ), ExtResource( 106 ), ExtResource( 121 ), ExtResource( 129 ), ExtResource( 100 ), ExtResource( 108 ), ExtResource( 110 ), ExtResource( 120 ) ],
|
||||
"loop": true,
|
||||
"name": "move-speed-right-04",
|
||||
"speed": 35.0
|
||||
} ]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=3]
|
||||
@ -323,11 +308,6 @@ radius = 41.5403
|
||||
|
||||
[sub_resource type="SpriteFrames" id=6]
|
||||
animations = [ {
|
||||
"frames": [ ExtResource( 27 ) ],
|
||||
"loop": true,
|
||||
"name": "01",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [ ExtResource( 168 ) ],
|
||||
"loop": true,
|
||||
"name": "03",
|
||||
@ -342,12 +322,14 @@ animations = [ {
|
||||
"loop": true,
|
||||
"name": "02",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [ ExtResource( 27 ) ],
|
||||
"loop": true,
|
||||
"name": "01",
|
||||
"speed": 5.0
|
||||
} ]
|
||||
|
||||
[node name="player" type="KinematicBody2D" groups=[
|
||||
"Net",
|
||||
"Player",
|
||||
]]
|
||||
[node name="player" type="KinematicBody2D" groups=["Net", "Player"]]
|
||||
script = ExtResource( 11 )
|
||||
theme = "03"
|
||||
|
||||
@ -403,10 +385,22 @@ scale = Vector2( 0.25, 0.25 )
|
||||
frames = SubResource( 6 )
|
||||
animation = "04"
|
||||
|
||||
[node name="Player-character-theme-gun-na" type="Sprite" parent="weaponHolder"]
|
||||
[node name="Player-character-theme-gun-na1" type="Sprite" parent="weaponHolder"]
|
||||
scale = Vector2( 0.25, 0.25 )
|
||||
texture = ExtResource( 171 )
|
||||
|
||||
[node name="Player-character-theme-gun-na2" type="Sprite" parent="weaponHolder"]
|
||||
scale = Vector2( 0.177591, 0.18125 )
|
||||
texture = ExtResource( 171 )
|
||||
|
||||
[node name="Player-character-theme-gun-na3" type="Sprite" parent="weaponHolder"]
|
||||
scale = Vector2( 0.375937, 0.251953 )
|
||||
texture = ExtResource( 171 )
|
||||
|
||||
[node name="Player-character-theme-gun-na4" type="Sprite" parent="weaponHolder"]
|
||||
scale = Vector2( 0.508138, 0.140008 )
|
||||
texture = ExtResource( 171 )
|
||||
|
||||
[connection signal="timeout" from="network_tick_rate" to="." method="_on_network_tick_rate_timeout"]
|
||||
[connection signal="timeout" from="reload_timer" to="." method="_on_reload_timer_timeout"]
|
||||
[connection signal="timeout" from="hit_timer" to="." method="_on_hit_timer_timeout"]
|
||||
|
||||
@ -0,0 +1,22 @@
|
||||
[gd_scene load_steps=4 format=2]
|
||||
|
||||
[ext_resource path="res://icon.png" type="Texture" id=1]
|
||||
[ext_resource path="res://script/Hyperbola/Hyperbolic_Barrel.gd" type="Script" id=2]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=1]
|
||||
extents = Vector2( 22.5946, 3.60519 )
|
||||
|
||||
[node name="Hyperbolic_Barrel" type="StaticBody2D"]
|
||||
script = ExtResource( 2 )
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
position = Vector2( 30.4661, 0.749161 )
|
||||
shape = SubResource( 1 )
|
||||
|
||||
[node name="icon" type="Sprite" parent="."]
|
||||
position = Vector2( 42.4007, 0.196289 )
|
||||
scale = Vector2( 1.31624, 0.140625 )
|
||||
texture = ExtResource( 1 )
|
||||
|
||||
[node name="Position2D" type="Position2D" parent="."]
|
||||
position = Vector2( 97.6552, 0.0842819 )
|
||||
@ -0,0 +1,22 @@
|
||||
[gd_scene load_steps=4 format=2]
|
||||
|
||||
[ext_resource path="res://pixil-frame-0 (1).png" type="Texture" id=1]
|
||||
[ext_resource path="res://script/Hyperbola/Hyperbolic_Bullet.gd" type="Script" id=2]
|
||||
|
||||
[sub_resource type="CapsuleShape2D" id=1]
|
||||
radius = 5.4212
|
||||
height = 7.62897
|
||||
|
||||
[node name="Bullet" type="Area2D"]
|
||||
script = ExtResource( 2 )
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="."]
|
||||
position = Vector2( 2, -19 )
|
||||
scale = Vector2( 0.199834, 0.199834 )
|
||||
texture = ExtResource( 1 )
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
rotation = 1.5708
|
||||
shape = SubResource( 1 )
|
||||
|
||||
[connection signal="body_entered" from="." to="." method="_on_Bullet_body_entered"]
|
||||
@ -0,0 +1,12 @@
|
||||
[gd_scene load_steps=4 format=2]
|
||||
|
||||
[ext_resource path="res://Line_Trajectory/Line_Bullet.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://script/Hyperbola/Hyperbolic_Env.gd" type="Script" id=2]
|
||||
[ext_resource path="res://script/Hyperbola/Hyperbolic_Bullet.gd" type="Script" id=3]
|
||||
|
||||
[node name="Env" type="Node2D"]
|
||||
script = ExtResource( 2 )
|
||||
|
||||
[node name="Bullet" parent="." instance=ExtResource( 1 )]
|
||||
position = Vector2( 0, -0.222725 )
|
||||
script = ExtResource( 3 )
|
||||
22
source/entities/shooting/Line_Trajectory/Line_Barrel.tscn
Normal file
22
source/entities/shooting/Line_Trajectory/Line_Barrel.tscn
Normal file
@ -0,0 +1,22 @@
|
||||
[gd_scene load_steps=4 format=2]
|
||||
|
||||
[ext_resource path="res://icon.png" type="Texture" id=1]
|
||||
[ext_resource path="res://script/Line/Line_Barrel.gd" type="Script" id=2]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=1]
|
||||
extents = Vector2( 22.5946, 3.60519 )
|
||||
|
||||
[node name="Line_Barrel" type="StaticBody2D"]
|
||||
script = ExtResource( 2 )
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
position = Vector2( 30.4661, 0.749161 )
|
||||
shape = SubResource( 1 )
|
||||
|
||||
[node name="icon" type="Sprite" parent="."]
|
||||
position = Vector2( 32.281, 0.196289 )
|
||||
scale = Vector2( 1, 0.140625 )
|
||||
texture = ExtResource( 1 )
|
||||
|
||||
[node name="Position2D" type="Position2D" parent="."]
|
||||
position = Vector2( 64.7166, 0.0842819 )
|
||||
22
source/entities/shooting/Line_Trajectory/Line_Bullet.tscn
Normal file
22
source/entities/shooting/Line_Trajectory/Line_Bullet.tscn
Normal file
@ -0,0 +1,22 @@
|
||||
[gd_scene load_steps=4 format=2]
|
||||
|
||||
[ext_resource path="res://pixil-frame-0 (1).png" type="Texture" id=1]
|
||||
[ext_resource path="res://script/Line/Line_Bullet.gd" type="Script" id=2]
|
||||
|
||||
[sub_resource type="CapsuleShape2D" id=1]
|
||||
radius = 5.4212
|
||||
height = 7.62897
|
||||
|
||||
[node name="Bullet" type="Area2D"]
|
||||
script = ExtResource( 2 )
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="."]
|
||||
position = Vector2( 2, -19 )
|
||||
scale = Vector2( 0.199834, 0.199834 )
|
||||
texture = ExtResource( 1 )
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
rotation = 1.5708
|
||||
shape = SubResource( 1 )
|
||||
|
||||
[connection signal="body_entered" from="." to="." method="_on_Bullet_body_entered"]
|
||||
10
source/entities/shooting/Line_Trajectory/Line_Env.tscn
Normal file
10
source/entities/shooting/Line_Trajectory/Line_Env.tscn
Normal file
@ -0,0 +1,10 @@
|
||||
[gd_scene load_steps=3 format=2]
|
||||
|
||||
[ext_resource path="res://Line_Trajectory/Line_Bullet.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://script/Line/Line_Env.gd" type="Script" id=2]
|
||||
|
||||
[node name="Env" type="Node2D"]
|
||||
script = ExtResource( 2 )
|
||||
|
||||
[node name="Bullet" parent="." instance=ExtResource( 1 )]
|
||||
position = Vector2( 0, -0.222725 )
|
||||
@ -0,0 +1,22 @@
|
||||
[gd_scene load_steps=4 format=2]
|
||||
|
||||
[ext_resource path="res://icon.png" type="Texture" id=1]
|
||||
[ext_resource path="res://script/Parabola/Parabolic_Barrel.gd" type="Script" id=2]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=1]
|
||||
extents = Vector2( 8.79762, 3.60519 )
|
||||
|
||||
[node name="Parabolic_Barrel" type="StaticBody2D"]
|
||||
script = ExtResource( 2 )
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
position = Vector2( 13.539, 2.08551 )
|
||||
shape = SubResource( 1 )
|
||||
|
||||
[node name="icon" type="Sprite" parent="."]
|
||||
position = Vector2( 16.2448, 0.641744 )
|
||||
scale = Vector2( 0.387507, 0.251987 )
|
||||
texture = ExtResource( 1 )
|
||||
|
||||
[node name="Position2D" type="Position2D" parent="."]
|
||||
position = Vector2( 34.426, 0.975182 )
|
||||
@ -0,0 +1,22 @@
|
||||
[gd_scene load_steps=4 format=2]
|
||||
|
||||
[ext_resource path="res://pixil-frame-0 (1).png" type="Texture" id=1]
|
||||
[ext_resource path="res://script/Line/Line_Bullet.gd" type="Script" id=2]
|
||||
|
||||
[sub_resource type="CapsuleShape2D" id=1]
|
||||
radius = 5.4212
|
||||
height = 7.62897
|
||||
|
||||
[node name="Bullet" type="Area2D"]
|
||||
script = ExtResource( 2 )
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="."]
|
||||
position = Vector2( 2, -19 )
|
||||
scale = Vector2( 0.199834, 0.199834 )
|
||||
texture = ExtResource( 1 )
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
rotation = 1.5708
|
||||
shape = SubResource( 1 )
|
||||
|
||||
[connection signal="body_entered" from="." to="." method="_on_Bullet_body_entered"]
|
||||
@ -0,0 +1,12 @@
|
||||
[gd_scene load_steps=4 format=2]
|
||||
|
||||
[ext_resource path="res://Line_Trajectory/Line_Bullet.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://script/Parabola/Parabolic_Env.gd" type="Script" id=2]
|
||||
[ext_resource path="res://script/Parabola/Parabolic_Bullet.gd" type="Script" id=3]
|
||||
|
||||
[node name="Env" type="Node2D"]
|
||||
script = ExtResource( 2 )
|
||||
|
||||
[node name="Bullet" parent="." instance=ExtResource( 1 )]
|
||||
position = Vector2( 0, -0.222725 )
|
||||
script = ExtResource( 3 )
|
||||
22
source/entities/shooting/Sine_Trajectory/Sine_Barrel.tscn
Normal file
22
source/entities/shooting/Sine_Trajectory/Sine_Barrel.tscn
Normal file
@ -0,0 +1,22 @@
|
||||
[gd_scene load_steps=4 format=2]
|
||||
|
||||
[ext_resource path="res://icon.png" type="Texture" id=1]
|
||||
[ext_resource path="res://script/Sine/Sine_Barrel.gd" type="Script" id=2]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=1]
|
||||
extents = Vector2( 21.0351, 6.99966 )
|
||||
|
||||
[node name="Sine_Barrel" type="StaticBody2D"]
|
||||
script = ExtResource( 2 )
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="."]
|
||||
position = Vector2( 32.0917, 0.471939 )
|
||||
scale = Vector2( 1, 0.336339 )
|
||||
texture = ExtResource( 1 )
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
position = Vector2( 30.8681, 0 )
|
||||
shape = SubResource( 1 )
|
||||
|
||||
[node name="Position2D" type="Position2D" parent="."]
|
||||
position = Vector2( 64.7166, 0.0842819 )
|
||||
22
source/entities/shooting/Sine_Trajectory/Sine_Bullet.tscn
Normal file
22
source/entities/shooting/Sine_Trajectory/Sine_Bullet.tscn
Normal file
@ -0,0 +1,22 @@
|
||||
[gd_scene load_steps=4 format=2]
|
||||
|
||||
[ext_resource path="res://pixil-frame-0 (1).png" type="Texture" id=1]
|
||||
[ext_resource path="res://script/Line/Line_Bullet.gd" type="Script" id=2]
|
||||
|
||||
[sub_resource type="CapsuleShape2D" id=1]
|
||||
radius = 5.4212
|
||||
height = 7.62897
|
||||
|
||||
[node name="Bullet" type="Area2D"]
|
||||
script = ExtResource( 2 )
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="."]
|
||||
position = Vector2( 2, -19 )
|
||||
scale = Vector2( 0.199834, 0.199834 )
|
||||
texture = ExtResource( 1 )
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
rotation = 1.5708
|
||||
shape = SubResource( 1 )
|
||||
|
||||
[connection signal="body_entered" from="." to="." method="_on_Bullet_body_entered"]
|
||||
12
source/entities/shooting/Sine_Trajectory/Sine_Env.tscn
Normal file
12
source/entities/shooting/Sine_Trajectory/Sine_Env.tscn
Normal file
@ -0,0 +1,12 @@
|
||||
[gd_scene load_steps=4 format=2]
|
||||
|
||||
[ext_resource path="res://Line_Trajectory/Line_Bullet.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://script/Sine/Sine_Env.gd" type="Script" id=2]
|
||||
[ext_resource path="res://script/Sine/Sine_Bullet.gd" type="Script" id=3]
|
||||
|
||||
[node name="Env" type="Node2D"]
|
||||
script = ExtResource( 2 )
|
||||
|
||||
[node name="Bullet" parent="." instance=ExtResource( 1 )]
|
||||
position = Vector2( 0, -0.222725 )
|
||||
script = ExtResource( 3 )
|
||||
30
source/entities/shooting/script/Gun.gd
Normal file
30
source/entities/shooting/script/Gun.gd
Normal file
@ -0,0 +1,30 @@
|
||||
extends Position2D
|
||||
|
||||
var trajectories = {
|
||||
'line' : preload("res://source/entities/shooting/Line_Trajectory/Line_Barrel.tscn"),
|
||||
'sine' : preload("res://source/entities/shooting/Sine_Trajectory/Sine_Barrel.tscn"),
|
||||
'parab' : preload("res://source/entities/shooting/Parabolic_Trajectory/Parabolic_Barrel.tscn"),
|
||||
'hyper' : preload("res://source/entities/shooting/Hyperbolic_Trajectory/Hyperbolic_Barrel.tscn")
|
||||
}
|
||||
|
||||
|
||||
func equip_gun(gun_type:String):
|
||||
for gun in get_children(): #if there is gun remove it
|
||||
gun.queue_free()
|
||||
|
||||
var gun = trajectories[gun_type].instance()
|
||||
add_child(gun)
|
||||
|
||||
|
||||
|
||||
func _process(delta):
|
||||
look_at(get_global_mouse_position())
|
||||
if Input.is_action_just_pressed("line"):
|
||||
equip_gun('line')
|
||||
if Input.is_action_just_pressed("sine"):
|
||||
equip_gun('sine')
|
||||
if Input.is_action_just_pressed("parab"):
|
||||
equip_gun('parab')
|
||||
if Input.is_action_just_pressed("hyper"):
|
||||
equip_gun('hyper')
|
||||
pass
|
||||
@ -0,0 +1,16 @@
|
||||
extends StaticBody2D # Y = aX
|
||||
|
||||
onready var bullet = preload("res://Hyperbolic_Trajectory/Hyperbolic_Env.tscn")
|
||||
|
||||
|
||||
func shoot():
|
||||
var b = bullet.instance()
|
||||
get_parent().get_parent().get_parent().add_child(b)
|
||||
b.global_position = $Position2D.global_position
|
||||
b.global_rotation = $Position2D.global_rotation
|
||||
|
||||
|
||||
|
||||
func _process(delta):
|
||||
if Input.is_action_just_pressed("shoot"):
|
||||
shoot()
|
||||
@ -0,0 +1,24 @@
|
||||
extends Area2D
|
||||
|
||||
var velocity = Vector2()
|
||||
var speed = 1
|
||||
var time = 0.5
|
||||
var gravitile = 5
|
||||
|
||||
|
||||
|
||||
func follow_hyperbolic_trajectory():
|
||||
velocity.x = gravitile * time
|
||||
velocity.y = 1/time
|
||||
|
||||
|
||||
func _process(delta):
|
||||
follow_hyperbolic_trajectory()
|
||||
time += delta
|
||||
position += velocity * speed * delta
|
||||
|
||||
|
||||
func _on_Bullet_body_entered(body):
|
||||
if body.is_in_group("mobs"):
|
||||
body.queue_free()
|
||||
queue_free()
|
||||
10
source/entities/shooting/script/Hyperbola/Hyperbolic_Env.gd
Normal file
10
source/entities/shooting/script/Hyperbola/Hyperbolic_Env.gd
Normal file
@ -0,0 +1,10 @@
|
||||
extends Node2D
|
||||
|
||||
|
||||
var time = 0
|
||||
|
||||
|
||||
func _process(delta):
|
||||
time += delta
|
||||
if time > 17:
|
||||
queue_free()
|
||||
26
source/entities/shooting/script/KinematicBody2D.gd
Normal file
26
source/entities/shooting/script/KinematicBody2D.gd
Normal file
@ -0,0 +1,26 @@
|
||||
extends KinematicBody2D
|
||||
|
||||
export var speed = 400
|
||||
var movement = Vector2(0, 0)
|
||||
|
||||
#func shoot():
|
||||
#var b = env.instance()
|
||||
#get_parent().add_child(b)
|
||||
#b.global_transform = $Gun.global_transform
|
||||
|
||||
func get_input():
|
||||
movement = Vector2()
|
||||
if Input.is_action_pressed("ui_right"):
|
||||
movement.x += 10
|
||||
if Input.is_action_pressed("ui_left"):
|
||||
movement.x -= 10
|
||||
if Input.is_action_pressed("ui_down"):
|
||||
movement.y += 10
|
||||
if Input.is_action_pressed("ui_up"):
|
||||
movement.y -= 10
|
||||
#if Input.is_action_just_pressed("shoot"):
|
||||
#shoot()
|
||||
|
||||
func _physics_process(delta):
|
||||
get_input()
|
||||
position += movement.normalized() * speed * delta
|
||||
16
source/entities/shooting/script/Line/Line_Barrel.gd
Normal file
16
source/entities/shooting/script/Line/Line_Barrel.gd
Normal file
@ -0,0 +1,16 @@
|
||||
extends StaticBody2D # Y = aX
|
||||
|
||||
onready var bullet = preload("res://Line_Trajectory/Line_Env.tscn")
|
||||
|
||||
|
||||
func shoot():
|
||||
var b = bullet.instance()
|
||||
get_parent().get_parent().get_parent().add_child(b)
|
||||
b.global_position = $Position2D.global_position
|
||||
b.global_rotation = $Position2D.global_rotation
|
||||
|
||||
|
||||
|
||||
func _process(delta):
|
||||
if Input.is_action_just_pressed("shoot"):
|
||||
shoot()
|
||||
43
source/entities/shooting/script/Line/Line_Bullet.gd
Normal file
43
source/entities/shooting/script/Line/Line_Bullet.gd
Normal file
@ -0,0 +1,43 @@
|
||||
extends Area2D
|
||||
|
||||
export var speed = 100
|
||||
var velocity = Vector2()
|
||||
|
||||
var time = 0
|
||||
export var amplitude = 4
|
||||
export var frequency = 5
|
||||
var gravitile = 5
|
||||
|
||||
|
||||
func follow_line_trajectory():
|
||||
velocity = Vector2(10, 0)
|
||||
|
||||
#func follow_parabolic_trajectory():
|
||||
#velocity.x = 5
|
||||
#velocity.y = 1 * time * gravitile
|
||||
#return velocity
|
||||
|
||||
#func follow_hyperbolic_trajectory():
|
||||
#velocity.x = gravitile * time
|
||||
#velocity.y = 1
|
||||
#return velocity
|
||||
|
||||
#func input():
|
||||
#if Input.is_action_just_pressed("line"):
|
||||
#return follow_sine_trajectory()
|
||||
#elif Input.is_action_just_pressed("sine"):
|
||||
#return follow_line_trajectory()
|
||||
#else:
|
||||
#print('Trajectory is not selected')
|
||||
#queue_free()
|
||||
|
||||
func _process(delta):
|
||||
follow_line_trajectory()
|
||||
time += delta
|
||||
position += velocity * speed * delta
|
||||
|
||||
|
||||
func _on_Bullet_body_entered(body):
|
||||
if body.is_in_group("mobs"):
|
||||
body.queue_free()
|
||||
queue_free()
|
||||
9
source/entities/shooting/script/Line/Line_Env.gd
Normal file
9
source/entities/shooting/script/Line/Line_Env.gd
Normal file
@ -0,0 +1,9 @@
|
||||
extends Node2D
|
||||
|
||||
var time = 0
|
||||
|
||||
|
||||
func _process(delta):
|
||||
time += delta
|
||||
if time > 17:
|
||||
queue_free()
|
||||
10
source/entities/shooting/script/Mob.gd
Normal file
10
source/entities/shooting/script/Mob.gd
Normal file
@ -0,0 +1,10 @@
|
||||
extends KinematicBody2D
|
||||
|
||||
|
||||
var velocity = Vector2(1, 1)
|
||||
|
||||
func _process(delta):
|
||||
var collision = move_and_collide(velocity * delta)
|
||||
|
||||
|
||||
|
||||
16
source/entities/shooting/script/Parabola/Parabolic_Barrel.gd
Normal file
16
source/entities/shooting/script/Parabola/Parabolic_Barrel.gd
Normal file
@ -0,0 +1,16 @@
|
||||
extends StaticBody2D # Y = aX
|
||||
|
||||
onready var bullet = preload("res://Parabolic_Trajectory/Parabolic_Env.tscn")
|
||||
|
||||
|
||||
func shoot():
|
||||
var b = bullet.instance()
|
||||
get_parent().get_parent().get_parent().add_child(b)
|
||||
b.global_position = $Position2D.global_position
|
||||
b.global_rotation = $Position2D.global_rotation
|
||||
|
||||
|
||||
|
||||
func _process(delta):
|
||||
if Input.is_action_just_pressed("shoot"):
|
||||
shoot()
|
||||
24
source/entities/shooting/script/Parabola/Parabolic_Bullet.gd
Normal file
24
source/entities/shooting/script/Parabola/Parabolic_Bullet.gd
Normal file
@ -0,0 +1,24 @@
|
||||
extends Area2D
|
||||
|
||||
export var speed = 100
|
||||
var velocity = Vector2()
|
||||
|
||||
var time = 0
|
||||
var gravitile = 5
|
||||
|
||||
|
||||
func follow_parabolic_trajectory():
|
||||
velocity.x = 5
|
||||
velocity.y = 1 * time * gravitile
|
||||
|
||||
|
||||
func _process(delta):
|
||||
follow_parabolic_trajectory()
|
||||
time += delta
|
||||
position += velocity * speed * delta
|
||||
|
||||
|
||||
func _on_Bullet_body_entered(body):
|
||||
if body.is_in_group("mobs"):
|
||||
body.queue_free()
|
||||
queue_free()
|
||||
@ -0,0 +1,9 @@
|
||||
extends Node2D
|
||||
|
||||
var time = 0
|
||||
|
||||
|
||||
func _process(delta):
|
||||
time += delta
|
||||
if time > 17:
|
||||
queue_free()
|
||||
20
source/entities/shooting/script/Sine/Sine_Barrel.gd
Normal file
20
source/entities/shooting/script/Sine/Sine_Barrel.gd
Normal file
@ -0,0 +1,20 @@
|
||||
extends StaticBody2D
|
||||
|
||||
onready var bullet = preload("res://Sine_Trajectory/Sine_Env.tscn")
|
||||
|
||||
var velocity = Vector2(1, 0)
|
||||
var shooting_speed = 200
|
||||
|
||||
|
||||
|
||||
func shoot():
|
||||
var b = bullet.instance()
|
||||
get_parent().get_parent().get_parent().add_child(b)
|
||||
b.global_position = $Position2D.global_position
|
||||
b.global_rotation = $Position2D.global_rotation
|
||||
pass
|
||||
|
||||
|
||||
func _process(delta):
|
||||
if Input.is_action_just_pressed("shoot"):
|
||||
shoot()
|
||||
25
source/entities/shooting/script/Sine/Sine_Bullet.gd
Normal file
25
source/entities/shooting/script/Sine/Sine_Bullet.gd
Normal file
@ -0,0 +1,25 @@
|
||||
extends Area2D
|
||||
|
||||
export var speed = 100
|
||||
var velocity = Vector2()
|
||||
|
||||
var time = 0
|
||||
export var amplitude = 4
|
||||
export var frequency = 5
|
||||
var gravitile = 5
|
||||
|
||||
|
||||
func follow_sine_trajectory():
|
||||
velocity.y = amplitude * cos(time * frequency)
|
||||
velocity.x = 5
|
||||
|
||||
func _process(delta):
|
||||
follow_sine_trajectory()
|
||||
time += delta
|
||||
position += velocity * speed * delta
|
||||
|
||||
|
||||
func _on_Bullet_body_entered(body):
|
||||
if body.is_in_group("mobs"):
|
||||
body.queue_free()
|
||||
queue_free()
|
||||
9
source/entities/shooting/script/Sine/Sine_Env.gd
Normal file
9
source/entities/shooting/script/Sine/Sine_Env.gd
Normal file
@ -0,0 +1,9 @@
|
||||
extends Node2D
|
||||
|
||||
var time = 0
|
||||
|
||||
|
||||
func _process(delta):
|
||||
time += delta
|
||||
if time > 17:
|
||||
queue_free()
|
||||
@ -66,8 +66,8 @@ margin_left = -150.0
|
||||
margin_top = -36.0
|
||||
margin_right = 150.0
|
||||
margin_bottom = 36.0
|
||||
custom_fonts/font = ExtResource( 5 )
|
||||
custom_colors/font_color = Color( 0, 0, 0, 1 )
|
||||
custom_fonts/font = ExtResource( 5 )
|
||||
text = "PLAY"
|
||||
align = 1
|
||||
valign = 1
|
||||
@ -91,8 +91,8 @@ margin_left = -98.8223
|
||||
margin_top = -36.0
|
||||
margin_right = 134.178
|
||||
margin_bottom = 36.0
|
||||
custom_fonts/font = ExtResource( 5 )
|
||||
custom_colors/font_color = Color( 0, 0, 0, 1 )
|
||||
custom_fonts/font = ExtResource( 5 )
|
||||
text = "LAN Party"
|
||||
align = 1
|
||||
valign = 1
|
||||
@ -123,8 +123,8 @@ margin_left = -150.0
|
||||
margin_top = -36.0
|
||||
margin_right = 150.0
|
||||
margin_bottom = 36.0
|
||||
custom_fonts/font = ExtResource( 5 )
|
||||
custom_colors/font_color = Color( 0, 0, 0, 1 )
|
||||
custom_fonts/font = ExtResource( 5 )
|
||||
text = "EXIT"
|
||||
align = 1
|
||||
valign = 1
|
||||
@ -138,8 +138,8 @@ margin_left = 1798.91
|
||||
margin_top = 989.536
|
||||
margin_right = 1889.91
|
||||
margin_bottom = 1061.54
|
||||
custom_fonts/font = ExtResource( 8 )
|
||||
custom_colors/font_color_disabled = Color( 1, 1, 1, 1 )
|
||||
custom_fonts/font = ExtResource( 8 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user