Compare commits
5 Commits
522e409dab
...
93559496b0
| Author | SHA1 | Date | |
|---|---|---|---|
| 93559496b0 | |||
| 471b1ee3db | |||
| ae24288db3 | |||
| 6b1efd27e3 | |||
| d9d5860d63 |
|
|
@ -1,4 +1,4 @@
|
||||||
[gd_resource type="SpriteFrames" load_steps=27 format=2]
|
[gd_resource type="SpriteFrames" load_steps=79 format=2]
|
||||||
|
|
||||||
[sub_resource type="StreamTexture" id=1]
|
[sub_resource type="StreamTexture" id=1]
|
||||||
load_path = "res://.import/idle.png-dac221ba43c70fde9cf788217116f029.stex"
|
load_path = "res://.import/idle.png-dac221ba43c70fde9cf788217116f029.stex"
|
||||||
|
|
@ -7,6 +7,33 @@ load_path = "res://.import/idle.png-dac221ba43c70fde9cf788217116f029.stex"
|
||||||
atlas = SubResource( 1 )
|
atlas = SubResource( 1 )
|
||||||
region = Rect2( 0, 0, 48, 48 )
|
region = Rect2( 0, 0, 48, 48 )
|
||||||
|
|
||||||
|
[sub_resource type="StreamTexture" id=27]
|
||||||
|
load_path = "res://.import/flip.png-9fe7948b7ca939b51b6b682ffd8dd717.stex"
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id=28]
|
||||||
|
atlas = SubResource( 27 )
|
||||||
|
region = Rect2( 0, 0, 48, 48 )
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id=29]
|
||||||
|
atlas = SubResource( 27 )
|
||||||
|
region = Rect2( 48, 0, 48, 48 )
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id=30]
|
||||||
|
atlas = SubResource( 27 )
|
||||||
|
region = Rect2( 96, 0, 48, 48 )
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id=31]
|
||||||
|
atlas = SubResource( 27 )
|
||||||
|
region = Rect2( 0, 48, 48, 48 )
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id=32]
|
||||||
|
atlas = SubResource( 27 )
|
||||||
|
region = Rect2( 48, 48, 48, 48 )
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id=33]
|
||||||
|
atlas = SubResource( 27 )
|
||||||
|
region = Rect2( 96, 48, 48, 48 )
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id=3]
|
[sub_resource type="AtlasTexture" id=3]
|
||||||
atlas = SubResource( 1 )
|
atlas = SubResource( 1 )
|
||||||
region = Rect2( 48, 0, 48, 48 )
|
region = Rect2( 48, 0, 48, 48 )
|
||||||
|
|
@ -27,6 +54,21 @@ region = Rect2( 48, 48, 48, 48 )
|
||||||
atlas = SubResource( 1 )
|
atlas = SubResource( 1 )
|
||||||
region = Rect2( 96, 48, 48, 48 )
|
region = Rect2( 96, 48, 48, 48 )
|
||||||
|
|
||||||
|
[sub_resource type="StreamTexture" id=34]
|
||||||
|
load_path = "res://.import/idle-crouch.png-8f1595d55411ac4e1fef2bb6cf7e5b5c.stex"
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id=35]
|
||||||
|
atlas = SubResource( 34 )
|
||||||
|
region = Rect2( 0, 0, 48, 48 )
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id=36]
|
||||||
|
atlas = SubResource( 34 )
|
||||||
|
region = Rect2( 48, 0, 48, 48 )
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id=37]
|
||||||
|
atlas = SubResource( 34 )
|
||||||
|
region = Rect2( 0, 48, 48, 48 )
|
||||||
|
|
||||||
[sub_resource type="StreamTexture" id=8]
|
[sub_resource type="StreamTexture" id=8]
|
||||||
load_path = "res://.import/jump.png-e5e27a6608040d3526a151777807f18b.stex"
|
load_path = "res://.import/jump.png-e5e27a6608040d3526a151777807f18b.stex"
|
||||||
|
|
||||||
|
|
@ -65,6 +107,122 @@ region = Rect2( 0, 48, 48, 48 )
|
||||||
atlas = SubResource( 12 )
|
atlas = SubResource( 12 )
|
||||||
region = Rect2( 48, 48, 48, 48 )
|
region = Rect2( 48, 48, 48, 48 )
|
||||||
|
|
||||||
|
[sub_resource type="StreamTexture" id=49]
|
||||||
|
load_path = "res://.import/ledge-climb.png-f1ecc7841600e3ca6f3624bf9903e1d9.stex"
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id=50]
|
||||||
|
atlas = SubResource( 49 )
|
||||||
|
region = Rect2( 0, 0, 48, 48 )
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id=51]
|
||||||
|
atlas = SubResource( 49 )
|
||||||
|
region = Rect2( 48, 0, 48, 48 )
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id=52]
|
||||||
|
atlas = SubResource( 49 )
|
||||||
|
region = Rect2( 96, 0, 48, 48 )
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id=53]
|
||||||
|
atlas = SubResource( 49 )
|
||||||
|
region = Rect2( 0, 48, 48, 48 )
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id=54]
|
||||||
|
atlas = SubResource( 49 )
|
||||||
|
region = Rect2( 48, 48, 48, 48 )
|
||||||
|
|
||||||
|
[sub_resource type="StreamTexture" id=72]
|
||||||
|
load_path = "res://.import/pull.png-86930899bb5993aca09d11af6f1e0eb0.stex"
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id=73]
|
||||||
|
atlas = SubResource( 72 )
|
||||||
|
region = Rect2( 0, 0, 48, 48 )
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id=74]
|
||||||
|
atlas = SubResource( 72 )
|
||||||
|
region = Rect2( 48, 0, 48, 48 )
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id=75]
|
||||||
|
atlas = SubResource( 72 )
|
||||||
|
region = Rect2( 96, 0, 48, 48 )
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id=76]
|
||||||
|
atlas = SubResource( 72 )
|
||||||
|
region = Rect2( 0, 48, 48, 48 )
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id=77]
|
||||||
|
atlas = SubResource( 72 )
|
||||||
|
region = Rect2( 48, 48, 48, 48 )
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id=78]
|
||||||
|
atlas = SubResource( 72 )
|
||||||
|
region = Rect2( 96, 48, 48, 48 )
|
||||||
|
|
||||||
|
[sub_resource type="StreamTexture" id=63]
|
||||||
|
load_path = "res://.import/push.png-83c0fa5d68432717ea8417b2150c5a91.stex"
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id=64]
|
||||||
|
atlas = SubResource( 63 )
|
||||||
|
region = Rect2( 0, 0, 48, 48 )
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id=65]
|
||||||
|
atlas = SubResource( 63 )
|
||||||
|
region = Rect2( 48, 0, 48, 48 )
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id=66]
|
||||||
|
atlas = SubResource( 63 )
|
||||||
|
region = Rect2( 96, 0, 48, 48 )
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id=67]
|
||||||
|
atlas = SubResource( 63 )
|
||||||
|
region = Rect2( 0, 48, 48, 48 )
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id=68]
|
||||||
|
atlas = SubResource( 63 )
|
||||||
|
region = Rect2( 48, 48, 48, 48 )
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id=69]
|
||||||
|
atlas = SubResource( 63 )
|
||||||
|
region = Rect2( 96, 48, 48, 48 )
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id=70]
|
||||||
|
atlas = SubResource( 63 )
|
||||||
|
region = Rect2( 0, 96, 48, 48 )
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id=71]
|
||||||
|
atlas = SubResource( 63 )
|
||||||
|
region = Rect2( 48, 96, 48, 48 )
|
||||||
|
|
||||||
|
[sub_resource type="StreamTexture" id=55]
|
||||||
|
load_path = "res://.import/roll.png-eab6c0796978b2753ede3c92eeb8ee9f.stex"
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id=56]
|
||||||
|
atlas = SubResource( 55 )
|
||||||
|
region = Rect2( 0, 0, 48, 48 )
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id=57]
|
||||||
|
atlas = SubResource( 55 )
|
||||||
|
region = Rect2( 48, 0, 48, 48 )
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id=58]
|
||||||
|
atlas = SubResource( 55 )
|
||||||
|
region = Rect2( 96, 0, 48, 48 )
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id=59]
|
||||||
|
atlas = SubResource( 55 )
|
||||||
|
region = Rect2( 0, 48, 48, 48 )
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id=60]
|
||||||
|
atlas = SubResource( 55 )
|
||||||
|
region = Rect2( 48, 48, 48, 48 )
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id=61]
|
||||||
|
atlas = SubResource( 55 )
|
||||||
|
region = Rect2( 96, 48, 48, 48 )
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id=62]
|
||||||
|
atlas = SubResource( 55 )
|
||||||
|
region = Rect2( 0, 96, 48, 48 )
|
||||||
|
|
||||||
[sub_resource type="StreamTexture" id=18]
|
[sub_resource type="StreamTexture" id=18]
|
||||||
load_path = "res://.import/run.png-d086b4c01d4e3ff36f750b9aff5a303a.stex"
|
load_path = "res://.import/run.png-d086b4c01d4e3ff36f750b9aff5a303a.stex"
|
||||||
|
|
||||||
|
|
@ -100,31 +258,109 @@ region = Rect2( 0, 96, 48, 48 )
|
||||||
atlas = SubResource( 18 )
|
atlas = SubResource( 18 )
|
||||||
region = Rect2( 48, 96, 48, 48 )
|
region = Rect2( 48, 96, 48, 48 )
|
||||||
|
|
||||||
|
[sub_resource type="StreamTexture" id=38]
|
||||||
|
load_path = "res://.import/run-crouch.png-13dd70dd30935cf28b601677cc96319e.stex"
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id=39]
|
||||||
|
atlas = SubResource( 38 )
|
||||||
|
region = Rect2( 0, 0, 48, 48 )
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id=40]
|
||||||
|
atlas = SubResource( 38 )
|
||||||
|
region = Rect2( 48, 0, 48, 48 )
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id=41]
|
||||||
|
atlas = SubResource( 38 )
|
||||||
|
region = Rect2( 96, 0, 48, 48 )
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id=42]
|
||||||
|
atlas = SubResource( 38 )
|
||||||
|
region = Rect2( 144, 0, 48, 48 )
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id=43]
|
||||||
|
atlas = SubResource( 38 )
|
||||||
|
region = Rect2( 0, 48, 48, 48 )
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id=44]
|
||||||
|
atlas = SubResource( 38 )
|
||||||
|
region = Rect2( 48, 48, 48, 48 )
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id=45]
|
||||||
|
atlas = SubResource( 38 )
|
||||||
|
region = Rect2( 96, 48, 48, 48 )
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id=46]
|
||||||
|
atlas = SubResource( 38 )
|
||||||
|
region = Rect2( 144, 48, 48, 48 )
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id=47]
|
||||||
|
atlas = SubResource( 38 )
|
||||||
|
region = Rect2( 0, 96, 48, 48 )
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id=48]
|
||||||
|
atlas = SubResource( 38 )
|
||||||
|
region = Rect2( 48, 96, 48, 48 )
|
||||||
|
|
||||||
[resource]
|
[resource]
|
||||||
resource_name = "PlayerE"
|
resource_name = "PlayerE"
|
||||||
animations = [ {
|
animations = [ {
|
||||||
"frames": [ SubResource( 2 ) ],
|
"frames": [ SubResource( 2 ) ],
|
||||||
"loop": true,
|
"loop": true,
|
||||||
"name": "default",
|
"name": "default",
|
||||||
"speed": 13.0
|
"speed": 10.0
|
||||||
|
}, {
|
||||||
|
"frames": [ SubResource( 28 ), SubResource( 29 ), SubResource( 30 ), SubResource( 31 ), SubResource( 32 ), SubResource( 33 ) ],
|
||||||
|
"loop": false,
|
||||||
|
"name": "flip",
|
||||||
|
"speed": 10.0
|
||||||
}, {
|
}, {
|
||||||
"frames": [ SubResource( 2 ), SubResource( 3 ), SubResource( 4 ), SubResource( 5 ), SubResource( 5 ), SubResource( 6 ), SubResource( 2 ), SubResource( 7 ), SubResource( 7 ), SubResource( 7 ) ],
|
"frames": [ SubResource( 2 ), SubResource( 3 ), SubResource( 4 ), SubResource( 5 ), SubResource( 5 ), SubResource( 6 ), SubResource( 2 ), SubResource( 7 ), SubResource( 7 ), SubResource( 7 ) ],
|
||||||
"loop": true,
|
"loop": true,
|
||||||
"name": "idle",
|
"name": "idle",
|
||||||
"speed": 11.0
|
"speed": 11.0
|
||||||
}, {
|
}, {
|
||||||
|
"frames": [ SubResource( 35 ), SubResource( 36 ), SubResource( 37 ), SubResource( 37 ), SubResource( 37 ), SubResource( 37 ), SubResource( 36 ), SubResource( 35 ), SubResource( 35 ), SubResource( 35 ) ],
|
||||||
|
"loop": true,
|
||||||
|
"name": "idle-crouch",
|
||||||
|
"speed": 10.0
|
||||||
|
}, {
|
||||||
"frames": [ SubResource( 9 ), SubResource( 10 ), SubResource( 11 ) ],
|
"frames": [ SubResource( 9 ), SubResource( 10 ), SubResource( 11 ) ],
|
||||||
"loop": false,
|
"loop": false,
|
||||||
"name": "jump",
|
"name": "jump",
|
||||||
"speed": 10.0
|
"speed": 2.0
|
||||||
}, {
|
}, {
|
||||||
"frames": [ SubResource( 13 ), SubResource( 14 ), SubResource( 14 ), SubResource( 15 ), SubResource( 15 ), SubResource( 16 ), SubResource( 16 ), SubResource( 17 ), SubResource( 17 ) ],
|
"frames": [ SubResource( 13 ), SubResource( 14 ), SubResource( 14 ), SubResource( 15 ), SubResource( 15 ), SubResource( 16 ), SubResource( 16 ), SubResource( 17 ), SubResource( 17 ) ],
|
||||||
"loop": false,
|
"loop": false,
|
||||||
"name": "land",
|
"name": "land",
|
||||||
"speed": 13.0
|
"speed": 16.0
|
||||||
|
}, {
|
||||||
|
"frames": [ SubResource( 50 ), SubResource( 51 ), SubResource( 52 ), SubResource( 53 ), SubResource( 54 ) ],
|
||||||
|
"loop": false,
|
||||||
|
"name": "ledge-climb",
|
||||||
|
"speed": 9.0
|
||||||
|
}, {
|
||||||
|
"frames": [ SubResource( 73 ), SubResource( 74 ), SubResource( 75 ), SubResource( 76 ), SubResource( 77 ), SubResource( 78 ) ],
|
||||||
|
"loop": true,
|
||||||
|
"name": "pull",
|
||||||
|
"speed": 6.0
|
||||||
|
}, {
|
||||||
|
"frames": [ SubResource( 64 ), SubResource( 65 ), SubResource( 66 ), SubResource( 66 ), SubResource( 67 ), SubResource( 68 ), SubResource( 69 ), SubResource( 70 ), SubResource( 70 ), SubResource( 71 ) ],
|
||||||
|
"loop": true,
|
||||||
|
"name": "push",
|
||||||
|
"speed": 10.0
|
||||||
|
}, {
|
||||||
|
"frames": [ SubResource( 56 ), SubResource( 57 ), SubResource( 58 ), SubResource( 59 ), SubResource( 60 ), SubResource( 61 ), SubResource( 62 ) ],
|
||||||
|
"loop": true,
|
||||||
|
"name": "roll",
|
||||||
|
"speed": 10.0
|
||||||
}, {
|
}, {
|
||||||
"frames": [ SubResource( 19 ), SubResource( 20 ), SubResource( 21 ), SubResource( 22 ), SubResource( 23 ), SubResource( 24 ), SubResource( 25 ), SubResource( 26 ) ],
|
"frames": [ SubResource( 19 ), SubResource( 20 ), SubResource( 21 ), SubResource( 22 ), SubResource( 23 ), SubResource( 24 ), SubResource( 25 ), SubResource( 26 ) ],
|
||||||
"loop": true,
|
"loop": true,
|
||||||
"name": "run",
|
"name": "run",
|
||||||
"speed": 13.0
|
"speed": 13.0
|
||||||
|
}, {
|
||||||
|
"frames": [ SubResource( 39 ), SubResource( 40 ), SubResource( 41 ), SubResource( 42 ), SubResource( 43 ), SubResource( 44 ), SubResource( 45 ), SubResource( 46 ), SubResource( 47 ), SubResource( 48 ) ],
|
||||||
|
"loop": true,
|
||||||
|
"name": "run-crouch",
|
||||||
|
"speed": 10.0
|
||||||
} ]
|
} ]
|
||||||
|
|
|
||||||
BIN
assets/actors/players/playerE/flip.png
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
35
assets/actors/players/playerE/flip.png.import
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="StreamTexture"
|
||||||
|
path="res://.import/flip.png-9fe7948b7ca939b51b6b682ffd8dd717.stex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://assets/actors/players/playerE/flip.png"
|
||||||
|
dest_files=[ "res://.import/flip.png-9fe7948b7ca939b51b6b682ffd8dd717.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=false
|
||||||
|
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
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
stream=false
|
||||||
|
size_limit=0
|
||||||
|
detect_3d=true
|
||||||
|
svg/scale=1.0
|
||||||
BIN
assets/actors/players/playerE/idle-crouch.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
35
assets/actors/players/playerE/idle-crouch.png.import
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="StreamTexture"
|
||||||
|
path="res://.import/idle-crouch.png-8f1595d55411ac4e1fef2bb6cf7e5b5c.stex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://assets/actors/players/playerE/idle-crouch.png"
|
||||||
|
dest_files=[ "res://.import/idle-crouch.png-8f1595d55411ac4e1fef2bb6cf7e5b5c.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=false
|
||||||
|
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
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
stream=false
|
||||||
|
size_limit=0
|
||||||
|
detect_3d=true
|
||||||
|
svg/scale=1.0
|
||||||
BIN
assets/actors/players/playerE/ledge-climb.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
35
assets/actors/players/playerE/ledge-climb.png.import
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="StreamTexture"
|
||||||
|
path="res://.import/ledge-climb.png-f1ecc7841600e3ca6f3624bf9903e1d9.stex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://assets/actors/players/playerE/ledge-climb.png"
|
||||||
|
dest_files=[ "res://.import/ledge-climb.png-f1ecc7841600e3ca6f3624bf9903e1d9.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=false
|
||||||
|
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
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
stream=false
|
||||||
|
size_limit=0
|
||||||
|
detect_3d=true
|
||||||
|
svg/scale=1.0
|
||||||
BIN
assets/actors/players/playerE/pull.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
35
assets/actors/players/playerE/pull.png.import
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="StreamTexture"
|
||||||
|
path="res://.import/pull.png-86930899bb5993aca09d11af6f1e0eb0.stex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://assets/actors/players/playerE/pull.png"
|
||||||
|
dest_files=[ "res://.import/pull.png-86930899bb5993aca09d11af6f1e0eb0.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=false
|
||||||
|
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
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
stream=false
|
||||||
|
size_limit=0
|
||||||
|
detect_3d=true
|
||||||
|
svg/scale=1.0
|
||||||
BIN
assets/actors/players/playerE/push.png
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
35
assets/actors/players/playerE/push.png.import
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="StreamTexture"
|
||||||
|
path="res://.import/push.png-83c0fa5d68432717ea8417b2150c5a91.stex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://assets/actors/players/playerE/push.png"
|
||||||
|
dest_files=[ "res://.import/push.png-83c0fa5d68432717ea8417b2150c5a91.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=false
|
||||||
|
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
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
stream=false
|
||||||
|
size_limit=0
|
||||||
|
detect_3d=true
|
||||||
|
svg/scale=1.0
|
||||||
BIN
assets/actors/players/playerE/roll.png
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
35
assets/actors/players/playerE/roll.png.import
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="StreamTexture"
|
||||||
|
path="res://.import/roll.png-eab6c0796978b2753ede3c92eeb8ee9f.stex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://assets/actors/players/playerE/roll.png"
|
||||||
|
dest_files=[ "res://.import/roll.png-eab6c0796978b2753ede3c92eeb8ee9f.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=false
|
||||||
|
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
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
stream=false
|
||||||
|
size_limit=0
|
||||||
|
detect_3d=true
|
||||||
|
svg/scale=1.0
|
||||||
BIN
assets/actors/players/playerE/run-crouch.png
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
35
assets/actors/players/playerE/run-crouch.png.import
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="StreamTexture"
|
||||||
|
path="res://.import/run-crouch.png-13dd70dd30935cf28b601677cc96319e.stex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://assets/actors/players/playerE/run-crouch.png"
|
||||||
|
dest_files=[ "res://.import/run-crouch.png-13dd70dd30935cf28b601677cc96319e.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=false
|
||||||
|
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
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
stream=false
|
||||||
|
size_limit=0
|
||||||
|
detect_3d=true
|
||||||
|
svg/scale=1.0
|
||||||
|
|
@ -54,10 +54,10 @@ func _process(delta):
|
||||||
# Not sure what should be called first here.
|
# Not sure what should be called first here.
|
||||||
if has_method('_state_process_' + current_state.name):
|
if has_method('_state_process_' + current_state.name):
|
||||||
call('_state_process_' + current_state.name)
|
call('_state_process_' + current_state.name)
|
||||||
process_animations()
|
#TODO: Not sure I want to do modifiers this way anymore
|
||||||
|
#process_state_modifier()
|
||||||
|
|
||||||
func _on_animation_finished():
|
func _on_animation_finished():
|
||||||
#Disabling for now:
|
|
||||||
if frames.get_animation_loop(animation) == false:
|
if frames.get_animation_loop(animation) == false:
|
||||||
#print("Stop!!!!!", current_state.animation_sequence.size(), " - ", current_state.animation_index)
|
#print("Stop!!!!!", current_state.animation_sequence.size(), " - ", current_state.animation_index)
|
||||||
if current_state.animation_sequence.size() > 0:
|
if current_state.animation_sequence.size() > 0:
|
||||||
|
|
@ -66,6 +66,7 @@ func _on_animation_finished():
|
||||||
if animation_index >= current_state.animation_sequence.size():
|
if animation_index >= current_state.animation_sequence.size():
|
||||||
#print("Stop!!!!!")
|
#print("Stop!!!!!")
|
||||||
current_state.animation_finished = true
|
current_state.animation_finished = true
|
||||||
|
# TODO: Allow a way to stop animation even if in a looped sequence
|
||||||
|
|
||||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||||
#func _process(delta):
|
#func _process(delta):
|
||||||
|
|
@ -73,7 +74,7 @@ func _on_animation_finished():
|
||||||
# If called, this will attempt to make the most appropriate animation change
|
# If called, this will attempt to make the most appropriate animation change
|
||||||
# would likely be triggered from an animation sequence finishing or a
|
# would likely be triggered from an animation sequence finishing or a
|
||||||
# modifier being applied/removed outside of enter/exit transitions.
|
# modifier being applied/removed outside of enter/exit transitions.
|
||||||
func update_animation(enter_frame := 0, index := 0, suffix := ''):
|
func change_animation(enter_frame := 0, index := 0, suffix := ''):
|
||||||
## TODO:
|
## TODO:
|
||||||
# Need to find a way to attempt to keep and transfer the Index or frame
|
# Need to find a way to attempt to keep and transfer the Index or frame
|
||||||
#
|
#
|
||||||
|
|
@ -149,7 +150,7 @@ func update_animation(enter_frame := 0, index := 0, suffix := ''):
|
||||||
print("Error! Resolved to empty animation sequence!?")
|
print("Error! Resolved to empty animation sequence!?")
|
||||||
return
|
return
|
||||||
|
|
||||||
func process_animations():
|
func process_state_modifier():
|
||||||
var modifier :StateModifier = current_state.modifier
|
var modifier :StateModifier = current_state.modifier
|
||||||
if modifier != null:
|
if modifier != null:
|
||||||
if modifier.state_timeout and modifier.state_timeout.time_left == 0:
|
if modifier.state_timeout and modifier.state_timeout.time_left == 0:
|
||||||
|
|
@ -160,13 +161,13 @@ func process_animations():
|
||||||
modifier.TYPE.ANIMATION_SUFFIX:
|
modifier.TYPE.ANIMATION_SUFFIX:
|
||||||
# Attempt to seemlessly transition animations.
|
# Attempt to seemlessly transition animations.
|
||||||
modifier = null
|
modifier = null
|
||||||
update_animation(frame,animation_index)
|
change_animation(frame,animation_index)
|
||||||
|
|
||||||
modifier.TYPE.REPLACE_ANIMATION:
|
modifier.TYPE.REPLACE_ANIMATION:
|
||||||
if current_state.debug_state:
|
if current_state.debug_state:
|
||||||
print("I don't have anything for replacements yet.")
|
print("I don't have anything for replacements yet.")
|
||||||
modifier = null
|
modifier = null
|
||||||
update_animation()
|
change_animation()
|
||||||
_:
|
_:
|
||||||
modifier = null
|
modifier = null
|
||||||
return
|
return
|
||||||
|
|
@ -216,13 +217,15 @@ func set_previous_animation( old_state: StateAnimatedActor, new_state: StateAnim
|
||||||
# Handle state change from subscribed state machine.
|
# Handle state change from subscribed state machine.
|
||||||
#From signal state_changed(old_state_name, new_state)
|
#From signal state_changed(old_state_name, new_state)
|
||||||
func _on_state_change(old_state_name:String, new_state :State):
|
func _on_state_change(old_state_name:String, new_state :State):
|
||||||
print ("got the state change signal ", new_state.name)
|
print ("1? got the state change signal ", new_state.name)
|
||||||
# set current state to new_state
|
# set current state to new_state
|
||||||
#TODO: Confirm that this is a reference to the state in the
|
#TODO: Confirm that this is a reference to the state in the
|
||||||
###### State machine
|
###### State machine
|
||||||
if new_state is StateAnimatedActor: #Testing this. Update: It works
|
if new_state is StateAnimatedActor: #Testing this. Update: It works
|
||||||
current_state = new_state
|
current_state = new_state
|
||||||
update_animation()
|
change_animation()
|
||||||
|
if has_method('_on_state_change_' + current_state.name):
|
||||||
|
call('_on_state_change_' + current_state.name)
|
||||||
print("It's an animated Actor state!")
|
print("It's an animated Actor state!")
|
||||||
else:
|
else:
|
||||||
push_warning("Received non animated Actor state.")
|
push_warning("Received non animated Actor state.")
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,6 @@ export var callable_state_machine :NodePath
|
||||||
var request_state_change: FuncRef
|
var request_state_change: FuncRef
|
||||||
|
|
||||||
onready var desired_movement_vector: Vector2 = Vector2(0,0)
|
onready var desired_movement_vector: Vector2 = Vector2(0,0)
|
||||||
var current_movement_state: String
|
|
||||||
|
|
||||||
# Since animactor state machine can actually view properties from this type
|
# Since animactor state machine can actually view properties from this type
|
||||||
# I'm thinking about moving the velocity tracker in here instead of player.
|
# I'm thinking about moving the velocity tracker in here instead of player.
|
||||||
|
|
@ -27,13 +26,15 @@ var velocity = Vector2(0,0)
|
||||||
var momentum = Vector2(0,0)
|
var momentum = Vector2(0,0)
|
||||||
var acceleration = Vector2(0,0)
|
var acceleration = Vector2(0,0)
|
||||||
|
|
||||||
var sim_velocity = Vector2(0,0)
|
#Removing Probably not used
|
||||||
|
#var sim_velocity = Vector2(0,0)
|
||||||
|
|
||||||
|
|
||||||
#Can't use floats here, switched to constants.
|
#Can't use floats here, switched to constants.
|
||||||
#enum directions {UP = -1, DOWN = 1, LEFT, RIGHT}
|
#enum directions {UP = -1, DOWN = 1, LEFT, RIGHT}
|
||||||
|
|
||||||
var attack_function: FuncRef
|
#Removing Probably not used
|
||||||
|
#var attack_function: FuncRef
|
||||||
|
|
||||||
const UP = -1.0
|
const UP = -1.0
|
||||||
const DOWN = 1.0
|
const DOWN = 1.0
|
||||||
|
|
@ -65,6 +66,8 @@ func process(delta):
|
||||||
|
|
||||||
# For event based input polling (Hadouken?)
|
# For event based input polling (Hadouken?)
|
||||||
func process_input(event: InputEvent):
|
func process_input(event: InputEvent):
|
||||||
|
# Reset desired movement vector
|
||||||
|
desired_movement_vector = Vector2(0,0)
|
||||||
if has_method('_state_process_input_' + current_state.name):
|
if has_method('_state_process_input_' + current_state.name):
|
||||||
call('_state_process_input_' + current_state.name)
|
call('_state_process_input_' + current_state.name)
|
||||||
|
|
||||||
|
|
@ -110,12 +113,14 @@ func get_climb_shape_location() -> Vector2:
|
||||||
return Vector2(-1,-1)
|
return Vector2(-1,-1)
|
||||||
|
|
||||||
func _on_state_change(old_state_name:String, new_state :State):
|
func _on_state_change(old_state_name:String, new_state :State):
|
||||||
print ("got the state change signal (MC) ", new_state.name)
|
#print ("got the state change signal (MC) ", new_state.name)
|
||||||
# set current state to new_state
|
# set current state to new_state
|
||||||
#TODO: Confirm that this is a reference to the state in the
|
#TODO: Confirm that this is a reference to the state in the
|
||||||
###### State machine
|
###### State machine
|
||||||
if new_state is StateAnimatedActor: #Testing this. Update: It works
|
if new_state is StateAnimatedActor: #Testing this. Update: It works
|
||||||
current_state = new_state
|
current_state = new_state
|
||||||
|
if has_method('_on_state_change_' + current_state.name):
|
||||||
|
call('_on_state_change_' + current_state.name)
|
||||||
else:
|
else:
|
||||||
push_warning("Received non animated Actor state.")
|
push_warning("Received non animated Actor state.")
|
||||||
#current_state = new_state
|
#current_state = new_state
|
||||||
|
|
@ -297,7 +302,7 @@ func move_actor_as_desired(delta: float, x_move_direction_override: float = 0):
|
||||||
"\nVel:" + str(round(velocity.x)) + "Min:" + str(round(MIN_SPEED)) + ",Max:" + str(round(MAX_SPEED))
|
"\nVel:" + str(round(velocity.x)) + "Min:" + str(round(MIN_SPEED)) + ",Max:" + str(round(MAX_SPEED))
|
||||||
) # str(round(jerk))
|
) # str(round(jerk))
|
||||||
|
|
||||||
sim_velocity.x = move_direction * sim_move_speed
|
#sim_velocity.x = move_direction * sim_move_speed
|
||||||
#print(adjusted_move_speed, ",", new_move_speed, ",", jerk)
|
#print(adjusted_move_speed, ",", new_move_speed, ",", jerk)
|
||||||
|
|
||||||
#print(new_move_speed, " ", adjusted_move_speed)
|
#print(new_move_speed, " ", adjusted_move_speed)
|
||||||
|
|
|
||||||
|
|
@ -9,13 +9,6 @@ extends State
|
||||||
##
|
##
|
||||||
## @WIP
|
## @WIP
|
||||||
|
|
||||||
# export (NodePath) var jump_node
|
|
||||||
|
|
||||||
# onready var jump_state: State = get_node(jump_node)
|
|
||||||
|
|
||||||
## Deprecated
|
|
||||||
# export var animation_name: String
|
|
||||||
|
|
||||||
# Movement Speed in Pixels Per Second
|
# Movement Speed in Pixels Per Second
|
||||||
export var move_speed: float = 60
|
export var move_speed: float = 60
|
||||||
export var move_acceleration: float = 0
|
export var move_acceleration: float = 0
|
||||||
|
|
@ -23,24 +16,20 @@ export var move_speed_modifier: float = 0
|
||||||
export var move_modifier_move_acceleration: float = 0
|
export var move_modifier_move_acceleration: float = 0
|
||||||
export var jerk_factor: float = 0
|
export var jerk_factor: float = 0
|
||||||
|
|
||||||
|
var gravity: int = ProjectSettings.get_setting("physics/2d/default_gravity")
|
||||||
|
|
||||||
#var adjusted_move_speed: float
|
#var adjusted_move_speed: float
|
||||||
var jerk: float
|
var jerk: float
|
||||||
|
|
||||||
var physics_modifier :StateModifier
|
|
||||||
|
|
||||||
var animation_finished: bool = false
|
var animation_finished: bool = false
|
||||||
|
|
||||||
# Not sure if this should be here. probably not
|
# Not sure if this should be here. probably not
|
||||||
export(Array, String) var animation_sequence
|
export(Array, String) var animation_sequence
|
||||||
|
|
||||||
# can't remember what this did
|
# Modifiers may not be needed anymore.
|
||||||
export(Dictionary) var emitter_frame_subscriptions
|
|
||||||
var frame_signal_emitted: bool = false
|
|
||||||
|
|
||||||
|
|
||||||
var gravity: int = ProjectSettings.get_setting("physics/2d/default_gravity")
|
|
||||||
|
|
||||||
var modifier: StateModifier
|
var modifier: StateModifier
|
||||||
|
var physics_modifier :StateModifier
|
||||||
|
|
||||||
|
|
||||||
func enter() -> void:
|
func enter() -> void:
|
||||||
|
|
|
||||||
|
|
@ -247,6 +247,11 @@ dash_1={
|
||||||
common/enable_pause_aware_picking=true
|
common/enable_pause_aware_picking=true
|
||||||
2d/default_gravity=600
|
2d/default_gravity=600
|
||||||
|
|
||||||
|
[physics]
|
||||||
|
|
||||||
|
2d/default_gravity=280
|
||||||
|
common/physics_interpolation=true
|
||||||
|
|
||||||
[rendering]
|
[rendering]
|
||||||
|
|
||||||
quality/driver/driver_name="GLES2"
|
quality/driver/driver_name="GLES2"
|
||||||
|
|
|
||||||
|
|
@ -2,15 +2,10 @@ extends AnimatedSprite_StateReceiver
|
||||||
|
|
||||||
func _ready():
|
func _ready():
|
||||||
# Lets see if this nutty thing works
|
# Lets see if this nutty thing works
|
||||||
var state_ref :State
|
#var state_ref :State
|
||||||
# state_ref = get_node(callable_state_machine).get_state_reference('idle')
|
#state_ref = get_node(callable_state_machine).get_state_reference('fall')
|
||||||
# state_ref.connect("state_entered", self, "_on_state_entered_idle")
|
#state_ref.connect("state_entered", self, "_on_state_entered_fall")
|
||||||
|
pass
|
||||||
state_ref = get_node(callable_state_machine).get_state_reference('fall')
|
|
||||||
state_ref.connect("state_entered", self, "_on_state_entered_fall")
|
|
||||||
# It works but node order really mattered.
|
|
||||||
# State machine needed to be processed first probably for ready function.
|
|
||||||
# good to know!
|
|
||||||
|
|
||||||
# I don't need this right now but I proved it can be done!
|
# I don't need this right now but I proved it can be done!
|
||||||
#func _state_process_idle():
|
#func _state_process_idle():
|
||||||
|
|
@ -22,7 +17,20 @@ func _ready():
|
||||||
#func _on_state_entered_idle():
|
#func _on_state_entered_idle():
|
||||||
# print("Anim Knows Idle State Entered!")
|
# print("Anim Knows Idle State Entered!")
|
||||||
|
|
||||||
func _on_state_entered_fall():
|
## Processing order is interesting here.
|
||||||
print("Anim Knows Fall State Entered!")
|
#Got call to enter state fall
|
||||||
|
#2? got the state change signal jump
|
||||||
|
#1? got the state change signal fall
|
||||||
|
#It's an animated Actor state!
|
||||||
|
## State signal comes before state machine. I'm not sure that's
|
||||||
|
## Good. Maybe I shouldn't subscribe to signals emitted by the state.
|
||||||
|
|
||||||
|
|
||||||
|
#func _on_state_entered_fall():
|
||||||
|
# print ("State Enter Signal ", current_state.name)
|
||||||
|
# frame = 2
|
||||||
|
# stop()
|
||||||
|
|
||||||
|
func _on_state_change_fall():
|
||||||
frame = 2
|
frame = 2
|
||||||
stop()
|
stop()
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,13 @@
|
||||||
extends Movement_StateReceiver
|
extends Movement_StateReceiver
|
||||||
|
|
||||||
#func _ready():
|
func _ready():
|
||||||
|
var state_ref :State
|
||||||
|
var state_name :String
|
||||||
|
state_name = 'jump'
|
||||||
|
state_ref = get_node(callable_state_machine).get_state_reference(state_name)
|
||||||
|
#TODO Should probably assert here or something.
|
||||||
|
state_ref.connect("state_entered", self, "_on_state_entered_" + state_name)
|
||||||
|
|
||||||
# Lets see if this nutty thing works
|
# Lets see if this nutty thing works
|
||||||
# var state_ref :State = get_node(callable_state_machine).get_state_reference('idle')
|
# var state_ref :State = get_node(callable_state_machine).get_state_reference('idle')
|
||||||
# state_ref.connect("state_entered", self, "_on_state_entered_idle")
|
# state_ref.connect("state_entered", self, "_on_state_entered_idle")
|
||||||
|
|
@ -15,16 +22,38 @@ func get_movement_direction() -> float:
|
||||||
desired_movement_vector.x = Input.get_axis("move_left_" + str(player_number), "move_right_" + str(player_number))
|
desired_movement_vector.x = Input.get_axis("move_left_" + str(player_number), "move_right_" + str(player_number))
|
||||||
return Input.get_axis("move_left_" + str(player_number), "move_right_" + str(player_number))
|
return Input.get_axis("move_left_" + str(player_number), "move_right_" + str(player_number))
|
||||||
|
|
||||||
|
func wants_jump() -> bool:
|
||||||
|
if Input.is_action_just_pressed("jump_" + str(player_number)):
|
||||||
|
desired_movement_vector.y = 1
|
||||||
|
return true
|
||||||
|
else:
|
||||||
|
return false
|
||||||
|
|
||||||
|
|
||||||
#TODO: This is probably not a good way to do this.
|
#TODO: This is probably not a good way to do this.
|
||||||
# we want to check input once and make decisions based on
|
# we want to check input once and make decisions based on
|
||||||
# velocity and desired movement.
|
# velocity and desired movement.
|
||||||
func _state_process_physics_input_idle():
|
#func _state_process_physics_input_idle():
|
||||||
get_movement_direction()
|
# get_movement_direction()
|
||||||
|
#
|
||||||
|
#func _state_process_physics_input_move():
|
||||||
|
# get_movement_direction()
|
||||||
|
|
||||||
func _state_process_physics_input_move():
|
# Probably better to do it this way then allocating individual
|
||||||
|
# state functions that all do the same thing.
|
||||||
|
func process_physics_input(delta):
|
||||||
|
# call the parent, Which would call the individuals
|
||||||
|
.process_physics_input(delta)
|
||||||
|
# then process movement controls
|
||||||
get_movement_direction()
|
get_movement_direction()
|
||||||
|
wants_jump()
|
||||||
|
|
||||||
|
|
||||||
func _state_process_physics_idle():
|
func _state_process_physics_idle():
|
||||||
|
|
||||||
|
if desired_movement_vector.y == 1:
|
||||||
|
request_state_change.call_func('jump')
|
||||||
|
|
||||||
#TODO: May need that 'bump' logic to make velocity work.
|
#TODO: May need that 'bump' logic to make velocity work.
|
||||||
if desired_movement_vector.x != 0: # and velocity.x != 0:
|
if desired_movement_vector.x != 0: # and velocity.x != 0:
|
||||||
request_state_change.call_func('move')
|
request_state_change.call_func('move')
|
||||||
|
|
@ -33,10 +62,29 @@ func _state_process_physics_idle():
|
||||||
#return fall_state
|
#return fall_state
|
||||||
request_state_change.call_func('fall')
|
request_state_change.call_func('fall')
|
||||||
|
|
||||||
|
func _state_process_physics_land():
|
||||||
|
if current_state.animation_finished == true:
|
||||||
|
request_state_change.call_func('idle')
|
||||||
|
|
||||||
|
if !parent.is_on_floor():
|
||||||
|
#return fall_state
|
||||||
|
request_state_change.call_func('fall')
|
||||||
|
|
||||||
func _state_process_physics_fall():
|
func _state_process_physics_fall():
|
||||||
if get_movement_direction() != 0.0:
|
if desired_movement_vector.x != 0.0:
|
||||||
parent.transform.x.x = get_movement_direction()
|
parent.transform.x.x = desired_movement_vector.x
|
||||||
|
|
||||||
|
if parent.is_on_floor():
|
||||||
|
#modifier.reference()
|
||||||
|
#idle_state.modifier = landing_modifier
|
||||||
|
request_state_change.call_func('land')
|
||||||
|
|
||||||
|
func _state_process_physics_jump():
|
||||||
|
if desired_movement_vector.x != 0.0:
|
||||||
|
parent.transform.x.x = desired_movement_vector.x
|
||||||
|
if velocity.y > 0:
|
||||||
|
request_state_change.call_func('fall')
|
||||||
|
|
||||||
if parent.is_on_floor():
|
if parent.is_on_floor():
|
||||||
#modifier.reference()
|
#modifier.reference()
|
||||||
#idle_state.modifier = landing_modifier
|
#idle_state.modifier = landing_modifier
|
||||||
|
|
@ -44,8 +92,8 @@ func _state_process_physics_fall():
|
||||||
|
|
||||||
func _state_process_physics_move():
|
func _state_process_physics_move():
|
||||||
# flip sprite in direction
|
# flip sprite in direction
|
||||||
if get_movement_direction() != 0.0:
|
if desired_movement_vector.x != 0.0:
|
||||||
parent.transform.x.x = get_movement_direction()
|
parent.transform.x.x = desired_movement_vector.x
|
||||||
|
|
||||||
if desired_movement_vector.x == 0:
|
if desired_movement_vector.x == 0:
|
||||||
request_state_change.call_func('idle')
|
request_state_change.call_func('idle')
|
||||||
|
|
@ -56,4 +104,9 @@ func _state_process_physics_move():
|
||||||
#func _on_state_entered_idle():
|
#func _on_state_entered_idle():
|
||||||
# print("Movement State Idle State Entered!")
|
# print("Movement State Idle State Entered!")
|
||||||
|
|
||||||
|
func _on_state_entered_jump():
|
||||||
|
#TODO: Make this a state variable
|
||||||
|
# I used to call it 'jump_force' like an idiot.
|
||||||
|
velocity.y = -200
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
[gd_scene load_steps=11 format=2]
|
[gd_scene load_steps=13 format=2]
|
||||||
|
|
||||||
[ext_resource path="res://lib/templates/Actor/ActorTemplate.tscn" type="PackedScene" id=1]
|
[ext_resource path="res://lib/templates/Actor/ActorTemplate.tscn" type="PackedScene" id=1]
|
||||||
[ext_resource path="res://assets/actors/players/playerE/PlayerE_SpriteFrames.tres" type="SpriteFrames" id=2]
|
[ext_resource path="res://assets/actors/players/playerE/PlayerE_SpriteFrames.tres" type="SpriteFrames" id=2]
|
||||||
|
|
@ -7,22 +7,8 @@
|
||||||
[ext_resource path="res://src/actors/players/playerE/PlayerE-AnimatedSprite_StateReceiver.gd" type="Script" id=5]
|
[ext_resource path="res://src/actors/players/playerE/PlayerE-AnimatedSprite_StateReceiver.gd" type="Script" id=5]
|
||||||
[ext_resource path="res://src/actors/players/playerE/PlayerE-Movement_StateReceiver.gd" type="Script" id=6]
|
[ext_resource path="res://src/actors/players/playerE/PlayerE-Movement_StateReceiver.gd" type="Script" id=6]
|
||||||
[ext_resource path="res://lib/classes/state_animated_actor.gd" type="Script" id=7]
|
[ext_resource path="res://lib/classes/state_animated_actor.gd" type="Script" id=7]
|
||||||
|
[ext_resource path="res://src/actors/players/playerE/states/jump.tres" type="Resource" id=8]
|
||||||
[sub_resource type="Resource" id=2]
|
[ext_resource path="res://src/actors/players/playerE/states/fall.tres" type="Resource" id=9]
|
||||||
resource_local_to_scene = true
|
|
||||||
resource_name = "fall"
|
|
||||||
script = ExtResource( 7 )
|
|
||||||
debug_state = false
|
|
||||||
timeout_seconds = 0.0
|
|
||||||
name = "fall"
|
|
||||||
move_speed = 90.0
|
|
||||||
move_acceleration = 0.0
|
|
||||||
move_speed_modifier = 0.0
|
|
||||||
move_modifier_move_acceleration = 0.0
|
|
||||||
jerk_factor = 0.0
|
|
||||||
animation_sequence = [ "jump" ]
|
|
||||||
emitter_frame_subscriptions = {
|
|
||||||
}
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id=3]
|
[sub_resource type="Resource" id=3]
|
||||||
resource_name = "move"
|
resource_name = "move"
|
||||||
|
|
@ -36,8 +22,20 @@ move_speed_modifier = 0.0
|
||||||
move_modifier_move_acceleration = 0.0
|
move_modifier_move_acceleration = 0.0
|
||||||
jerk_factor = 0.0
|
jerk_factor = 0.0
|
||||||
animation_sequence = [ "run" ]
|
animation_sequence = [ "run" ]
|
||||||
emitter_frame_subscriptions = {
|
|
||||||
}
|
[sub_resource type="Resource" id=4]
|
||||||
|
resource_local_to_scene = true
|
||||||
|
resource_name = "land"
|
||||||
|
script = ExtResource( 7 )
|
||||||
|
debug_state = false
|
||||||
|
timeout_seconds = 0.0
|
||||||
|
name = "land"
|
||||||
|
move_speed = 30.0
|
||||||
|
move_acceleration = 0.0
|
||||||
|
move_speed_modifier = 0.0
|
||||||
|
move_modifier_move_acceleration = 0.0
|
||||||
|
jerk_factor = 0.0
|
||||||
|
animation_sequence = [ "land" ]
|
||||||
|
|
||||||
[sub_resource type="RectangleShape2D" id=1]
|
[sub_resource type="RectangleShape2D" id=1]
|
||||||
extents = Vector2( 7, 14 )
|
extents = Vector2( 7, 14 )
|
||||||
|
|
@ -48,7 +46,7 @@ actor_type = "Player"
|
||||||
|
|
||||||
[node name="Movement_StateMachine" parent="." index="0"]
|
[node name="Movement_StateMachine" parent="." index="0"]
|
||||||
starting_state_name = "idle"
|
starting_state_name = "idle"
|
||||||
states = [ ExtResource( 4 ), SubResource( 2 ), SubResource( 3 ) ]
|
states = [ ExtResource( 4 ), ExtResource( 9 ), SubResource( 3 ), ExtResource( 8 ), SubResource( 4 ) ]
|
||||||
|
|
||||||
[node name="AnimatedSprite_StateReceiver" parent="." index="1"]
|
[node name="AnimatedSprite_StateReceiver" parent="." index="1"]
|
||||||
frames = ExtResource( 2 )
|
frames = ExtResource( 2 )
|
||||||
|
|
@ -58,12 +56,12 @@ __meta__ = {
|
||||||
"layer": "",
|
"layer": "",
|
||||||
"o_ex_p": "-.*",
|
"o_ex_p": "-.*",
|
||||||
"o_folder": "res://assets/actors/players/playerE",
|
"o_folder": "res://assets/actors/players/playerE",
|
||||||
"o_name": "run",
|
"o_name": "pull",
|
||||||
"only_visible": true,
|
"only_visible": true,
|
||||||
"op_exp": true,
|
"op_exp": true,
|
||||||
"sf_name": "PlayerE_SpriteFrames",
|
"sf_name": "PlayerE_SpriteFrames",
|
||||||
"slice": "",
|
"slice": "",
|
||||||
"source": "/home/relay01/Assets/Library/Asset Packs 1-5/Asset Packs 1-4 (final)/Asset Pack-V1/Player Run/player run 48x48.aseprite"
|
"source": "/home/relay01/Assets/Library/Asset Packs 1-5/Asset Packs 1-4 (final)/Asset Pack-V2/Pull/player pull 48x48.aseprite"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
17
src/actors/players/playerE/states/fall.tres
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
[gd_resource type="Resource" load_steps=2 format=2]
|
||||||
|
|
||||||
|
[ext_resource path="res://lib/classes/state_animated_actor.gd" type="Script" id=1]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
resource_local_to_scene = true
|
||||||
|
resource_name = "fall"
|
||||||
|
script = ExtResource( 1 )
|
||||||
|
debug_state = false
|
||||||
|
timeout_seconds = 0.0
|
||||||
|
name = "fall"
|
||||||
|
move_speed = 90.0
|
||||||
|
move_acceleration = 0.0
|
||||||
|
move_speed_modifier = 0.0
|
||||||
|
move_modifier_move_acceleration = 0.0
|
||||||
|
jerk_factor = 0.0
|
||||||
|
animation_sequence = [ "jump" ]
|
||||||
|
|
@ -15,5 +15,3 @@ move_speed_modifier = 0.0
|
||||||
move_modifier_move_acceleration = 0.0
|
move_modifier_move_acceleration = 0.0
|
||||||
jerk_factor = 0.0
|
jerk_factor = 0.0
|
||||||
animation_sequence = [ "idle" ]
|
animation_sequence = [ "idle" ]
|
||||||
emitter_frame_subscriptions = {
|
|
||||||
}
|
|
||||||
|
|
|
||||||
17
src/actors/players/playerE/states/jump.tres
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
[gd_resource type="Resource" load_steps=2 format=2]
|
||||||
|
|
||||||
|
[ext_resource path="res://lib/classes/state_animated_actor.gd" type="Script" id=1]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
resource_local_to_scene = true
|
||||||
|
resource_name = "jump"
|
||||||
|
script = ExtResource( 1 )
|
||||||
|
debug_state = false
|
||||||
|
timeout_seconds = 0.0
|
||||||
|
name = "jump"
|
||||||
|
move_speed = 90.0
|
||||||
|
move_acceleration = 0.0
|
||||||
|
move_speed_modifier = 0.0
|
||||||
|
move_modifier_move_acceleration = 0.0
|
||||||
|
jerk_factor = 0.0
|
||||||
|
animation_sequence = [ "jump" ]
|
||||||