fix: tweaked AnimationTree for Blobby
This commit is contained in:
parent
77b6ca3b7b
commit
4fd7452f94
@ -1,4 +1,4 @@
|
|||||||
[gd_scene load_steps=118 format=2]
|
[gd_scene load_steps=122 format=2]
|
||||||
|
|
||||||
[ext_resource path="res://assets/blobby/blobby-effects-spritesheet.png" type="Texture" id=1]
|
[ext_resource path="res://assets/blobby/blobby-effects-spritesheet.png" type="Texture" id=1]
|
||||||
[ext_resource path="res://src/Actors/Blobby/DeathShader.tres" type="Material" id=2]
|
[ext_resource path="res://src/Actors/Blobby/DeathShader.tres" type="Material" id=2]
|
||||||
@ -167,18 +167,23 @@ switch_mode = 2
|
|||||||
auto_advance = true
|
auto_advance = true
|
||||||
|
|
||||||
[sub_resource type="AnimationNodeStateMachineTransition" id=147]
|
[sub_resource type="AnimationNodeStateMachineTransition" id=147]
|
||||||
|
priority = 5
|
||||||
|
|
||||||
[sub_resource type="AnimationNodeStateMachineTransition" id=148]
|
[sub_resource type="AnimationNodeStateMachineTransition" id=148]
|
||||||
switch_mode = 2
|
switch_mode = 2
|
||||||
auto_advance = true
|
auto_advance = true
|
||||||
|
priority = 0
|
||||||
|
|
||||||
[sub_resource type="AnimationNodeStateMachineTransition" id=149]
|
[sub_resource type="AnimationNodeStateMachineTransition" id=149]
|
||||||
|
|
||||||
[sub_resource type="AnimationNodeStateMachineTransition" id=150]
|
[sub_resource type="AnimationNodeStateMachineTransition" id=150]
|
||||||
|
switch_mode = 2
|
||||||
|
priority = 0
|
||||||
|
|
||||||
[sub_resource type="AnimationNodeStateMachineTransition" id=151]
|
[sub_resource type="AnimationNodeStateMachineTransition" id=151]
|
||||||
switch_mode = 2
|
switch_mode = 2
|
||||||
auto_advance = true
|
auto_advance = true
|
||||||
|
priority = 0
|
||||||
|
|
||||||
[sub_resource type="AnimationNodeStateMachineTransition" id=152]
|
[sub_resource type="AnimationNodeStateMachineTransition" id=152]
|
||||||
|
|
||||||
@ -209,13 +214,16 @@ priority = 2
|
|||||||
priority = 2
|
priority = 2
|
||||||
|
|
||||||
[sub_resource type="AnimationNodeStateMachineTransition" id=163]
|
[sub_resource type="AnimationNodeStateMachineTransition" id=163]
|
||||||
|
switch_mode = 2
|
||||||
|
|
||||||
[sub_resource type="AnimationNodeStateMachineTransition" id=164]
|
[sub_resource type="AnimationNodeStateMachineTransition" id=164]
|
||||||
priority = 2
|
priority = 2
|
||||||
|
|
||||||
[sub_resource type="AnimationNodeStateMachineTransition" id=165]
|
[sub_resource type="AnimationNodeStateMachineTransition" id=165]
|
||||||
|
switch_mode = 2
|
||||||
|
|
||||||
[sub_resource type="AnimationNodeStateMachineTransition" id=166]
|
[sub_resource type="AnimationNodeStateMachineTransition" id=166]
|
||||||
|
switch_mode = 2
|
||||||
|
|
||||||
[sub_resource type="AnimationNodeStateMachineTransition" id=167]
|
[sub_resource type="AnimationNodeStateMachineTransition" id=167]
|
||||||
xfade_time = 0.1
|
xfade_time = 0.1
|
||||||
@ -258,36 +266,44 @@ priority = 0
|
|||||||
|
|
||||||
[sub_resource type="AnimationNodeStateMachineTransition" id=189]
|
[sub_resource type="AnimationNodeStateMachineTransition" id=189]
|
||||||
|
|
||||||
|
[sub_resource type="AnimationNodeStateMachineTransition" id=193]
|
||||||
|
|
||||||
|
[sub_resource type="AnimationNodeStateMachineTransition" id=194]
|
||||||
|
|
||||||
|
[sub_resource type="AnimationNodeStateMachineTransition" id=195]
|
||||||
|
|
||||||
|
[sub_resource type="AnimationNodeStateMachineTransition" id=196]
|
||||||
|
|
||||||
[sub_resource type="AnimationNodeStateMachine" id=47]
|
[sub_resource type="AnimationNodeStateMachine" id=47]
|
||||||
states/duckTurn/node = SubResource( 126 )
|
states/duckTurn/node = SubResource( 126 )
|
||||||
states/duckTurn/position = Vector2( 1795.54, 241 )
|
states/duckTurn/position = Vector2( 1795.54, 241 )
|
||||||
states/ducking/node = SubResource( 110 )
|
states/ducking/node = SubResource( 110 )
|
||||||
states/ducking/position = Vector2( 1795.54, 129.009 )
|
states/ducking/position = Vector2( 1795.54, 129.009 )
|
||||||
states/falling/node = SubResource( 113 )
|
states/falling/node = SubResource( 113 )
|
||||||
states/falling/position = Vector2( 2118.54, 129.009 )
|
states/falling/position = Vector2( 2119.49, 129.011 )
|
||||||
states/idleTurn/node = SubResource( 127 )
|
states/idleTurn/node = SubResource( 127 )
|
||||||
states/idleTurn/position = Vector2( 1375.54, -193.991 )
|
states/idleTurn/position = Vector2( 1375.54, -193.991 )
|
||||||
states/idling/node = SubResource( 116 )
|
states/idling/node = SubResource( 116 )
|
||||||
states/idling/position = Vector2( 1375.54, -54 )
|
states/idling/position = Vector2( 1375.63, -53.9546 )
|
||||||
states/jumpToFall/node = SubResource( 119 )
|
states/jumpToFall/node = SubResource( 119 )
|
||||||
states/jumpToFall/position = Vector2( 1795.54, 306.009 )
|
states/jumpToFall/position = Vector2( 1795.36, 322.199 )
|
||||||
states/jumping/node = SubResource( 125 )
|
states/jumping/node = SubResource( 125 )
|
||||||
states/jumping/position = Vector2( 1375.54, 117.009 )
|
states/jumping/position = Vector2( 1375.54, 117.961 )
|
||||||
states/runToJump/node = SubResource( 146 )
|
states/runToJump/node = SubResource( 146 )
|
||||||
states/runToJump/position = Vector2( 1191.54, 36 )
|
states/runToJump/position = Vector2( 2191.5, 650.286 )
|
||||||
states/running/node = SubResource( 122 )
|
states/running/node = SubResource( 122 )
|
||||||
states/running/position = Vector2( 2266.54, -54 )
|
states/running/position = Vector2( 2273.2, -53.7278 )
|
||||||
states/turnToRun/node = SubResource( 130 )
|
states/turnToRun/node = SubResource( 130 )
|
||||||
states/turnToRun/position = Vector2( 1795.54, -308.991 )
|
states/turnToRun/position = Vector2( 1795.54, -308.991 )
|
||||||
states/walking/node = SubResource( 133 )
|
states/walking/node = SubResource( 133 )
|
||||||
states/walking/position = Vector2( 1795.54, -54 )
|
states/walking/position = Vector2( 1795.54, -54 )
|
||||||
states/wallslideToJump/node = SubResource( 136 )
|
states/wallslideToJump/node = SubResource( 136 )
|
||||||
states/wallslideToJump/position = Vector2( 1375.54, 343.009 )
|
states/wallslideToJump/position = Vector2( 1374.76, 343.009 )
|
||||||
states/wallsliding/node = SubResource( 96 )
|
states/wallsliding/node = SubResource( 96 )
|
||||||
states/wallsliding/position = Vector2( 1795.54, 493.009 )
|
states/wallsliding/position = Vector2( 1795.54, 493.009 )
|
||||||
transitions = [ "falling", "wallsliding", SubResource( 138 ), "wallsliding", "idling", SubResource( 139 ), "wallsliding", "wallslideToJump", SubResource( 140 ), "wallslideToJump", "jumping", SubResource( 141 ), "idling", "jumping", SubResource( 147 ), "runToJump", "jumping", SubResource( 148 ), "ducking", "jumping", SubResource( 149 ), "jumping", "jumpToFall", SubResource( 150 ), "jumpToFall", "falling", SubResource( 151 ), "ducking", "duckTurn", SubResource( 152 ), "duckTurn", "ducking", SubResource( 153 ), "falling", "ducking", SubResource( 154 ), "ducking", "falling", SubResource( 155 ), "ducking", "walking", SubResource( 156 ), "walking", "ducking", SubResource( 157 ), "idling", "ducking", SubResource( 158 ), "ducking", "idling", SubResource( 159 ), "ducking", "running", SubResource( 160 ), "running", "ducking", SubResource( 161 ), "running", "falling", SubResource( 162 ), "falling", "running", SubResource( 163 ), "walking", "falling", SubResource( 164 ), "falling", "walking", SubResource( 165 ), "falling", "idling", SubResource( 166 ), "idling", "walking", SubResource( 167 ), "walking", "idling", SubResource( 168 ), "walking", "turnToRun", SubResource( 169 ), "turnToRun", "walking", SubResource( 170 ), "running", "turnToRun", SubResource( 171 ), "turnToRun", "running", SubResource( 172 ), "idling", "idleTurn", SubResource( 173 ), "walking", "idleTurn", SubResource( 174 ), "idleTurn", "walking", SubResource( 175 ), "idling", "turnToRun", SubResource( 176 ), "turnToRun", "idling", SubResource( 177 ), "running", "runToJump", SubResource( 178 ), "wallsliding", "falling", SubResource( 137 ), "jumping", "wallsliding", SubResource( 189 ) ]
|
transitions = [ "falling", "wallsliding", SubResource( 138 ), "wallsliding", "idling", SubResource( 139 ), "wallsliding", "wallslideToJump", SubResource( 140 ), "wallslideToJump", "jumping", SubResource( 141 ), "idling", "jumping", SubResource( 147 ), "runToJump", "jumping", SubResource( 148 ), "ducking", "jumping", SubResource( 149 ), "jumping", "jumpToFall", SubResource( 150 ), "jumpToFall", "falling", SubResource( 151 ), "ducking", "duckTurn", SubResource( 152 ), "duckTurn", "ducking", SubResource( 153 ), "falling", "ducking", SubResource( 154 ), "ducking", "falling", SubResource( 155 ), "ducking", "walking", SubResource( 156 ), "walking", "ducking", SubResource( 157 ), "idling", "ducking", SubResource( 158 ), "ducking", "idling", SubResource( 159 ), "ducking", "running", SubResource( 160 ), "running", "ducking", SubResource( 161 ), "running", "falling", SubResource( 162 ), "falling", "running", SubResource( 163 ), "walking", "falling", SubResource( 164 ), "falling", "walking", SubResource( 165 ), "falling", "idling", SubResource( 166 ), "idling", "walking", SubResource( 167 ), "walking", "idling", SubResource( 168 ), "walking", "turnToRun", SubResource( 169 ), "turnToRun", "walking", SubResource( 170 ), "running", "turnToRun", SubResource( 171 ), "turnToRun", "running", SubResource( 172 ), "idling", "idleTurn", SubResource( 173 ), "walking", "idleTurn", SubResource( 174 ), "idleTurn", "walking", SubResource( 175 ), "idling", "turnToRun", SubResource( 176 ), "turnToRun", "idling", SubResource( 177 ), "running", "runToJump", SubResource( 178 ), "wallsliding", "falling", SubResource( 137 ), "jumping", "wallsliding", SubResource( 189 ), "jumping", "idling", SubResource( 193 ), "jumping", "walking", SubResource( 194 ), "runToJump", "wallsliding", SubResource( 195 ), "jumpToFall", "idling", SubResource( 196 ) ]
|
||||||
start_node = "idling"
|
start_node = "idling"
|
||||||
graph_offset = Vector2( 1100.54, -208.991 )
|
graph_offset = Vector2( 1105.54, -34.431 )
|
||||||
|
|
||||||
[sub_resource type="AnimationNodeStateMachinePlayback" id=48]
|
[sub_resource type="AnimationNodeStateMachinePlayback" id=48]
|
||||||
|
|
||||||
@ -1227,7 +1243,7 @@ tracks/2/keys = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
[sub_resource type="Animation" id=6]
|
[sub_resource type="Animation" id=6]
|
||||||
length = 0.1
|
length = 0.13
|
||||||
loop = true
|
loop = true
|
||||||
tracks/0/type = "value"
|
tracks/0/type = "value"
|
||||||
tracks/0/path = NodePath(".:frame")
|
tracks/0/path = NodePath(".:frame")
|
||||||
@ -1376,7 +1392,7 @@ tracks/11/keys = {
|
|||||||
|
|
||||||
[sub_resource type="Animation" id=106]
|
[sub_resource type="Animation" id=106]
|
||||||
resource_name = "fallingLeft"
|
resource_name = "fallingLeft"
|
||||||
length = 0.1
|
length = 0.13
|
||||||
loop = true
|
loop = true
|
||||||
tracks/0/type = "value"
|
tracks/0/type = "value"
|
||||||
tracks/0/path = NodePath(".:frame")
|
tracks/0/path = NodePath(".:frame")
|
||||||
|
|||||||
@ -15,7 +15,6 @@ onready var slope_raycast = get_node("%SlopeRaycast")
|
|||||||
|
|
||||||
var facing = 1
|
var facing = 1
|
||||||
var didTurn
|
var didTurn
|
||||||
var state_time := 0.0
|
|
||||||
|
|
||||||
# Adds the intial states
|
# Adds the intial states
|
||||||
func _ready():
|
func _ready():
|
||||||
@ -139,7 +138,6 @@ func _get_transition(delta):
|
|||||||
# + String(round(parent.velocity.y / 10))
|
# + String(round(parent.velocity.y / 10))
|
||||||
)
|
)
|
||||||
var new_state
|
var new_state
|
||||||
state_time += delta
|
|
||||||
if !parent.is_on_floor():
|
if !parent.is_on_floor():
|
||||||
if parent.velocity.y < 0:
|
if parent.velocity.y < 0:
|
||||||
new_state = states.jump
|
new_state = states.jump
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user