gd: state chart supports dashing. new greybox material
This commit is contained in:
@ -3,16 +3,17 @@
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://boasm0g587eov"
|
||||
path.s3tc="res://.godot/imported/texture_01.png-9deee4bf2e81814eb5c9325f2657f8c8.s3tc.ctex"
|
||||
path.etc2="res://.godot/imported/texture_01.png-9deee4bf2e81814eb5c9325f2657f8c8.etc2.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["etc2_astc"],
|
||||
"imported_formats": ["s3tc_bptc", "etc2_astc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://player_controller/Assets/Textures/GridTexture/Dark/texture_01.png"
|
||||
dest_files=["res://.godot/imported/texture_01.png-9deee4bf2e81814eb5c9325f2657f8c8.etc2.ctex"]
|
||||
dest_files=["res://.godot/imported/texture_01.png-9deee4bf2e81814eb5c9325f2657f8c8.s3tc.ctex", "res://.godot/imported/texture_01.png-9deee4bf2e81814eb5c9325f2657f8c8.etc2.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
|
@ -3,16 +3,17 @@
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://3e1klega6uye"
|
||||
path.s3tc="res://.godot/imported/texture_01.png-ae5afc2ae737d1e792f0b8a0a5af4d3f.s3tc.ctex"
|
||||
path.etc2="res://.godot/imported/texture_01.png-ae5afc2ae737d1e792f0b8a0a5af4d3f.etc2.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["etc2_astc"],
|
||||
"imported_formats": ["s3tc_bptc", "etc2_astc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://player_controller/Assets/Textures/GridTexture/Green/texture_01.png"
|
||||
dest_files=["res://.godot/imported/texture_01.png-ae5afc2ae737d1e792f0b8a0a5af4d3f.etc2.ctex"]
|
||||
dest_files=["res://.godot/imported/texture_01.png-ae5afc2ae737d1e792f0b8a0a5af4d3f.s3tc.ctex", "res://.godot/imported/texture_01.png-ae5afc2ae737d1e792f0b8a0a5af4d3f.etc2.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
|
@ -3,16 +3,17 @@
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://0t6ie0fkv2op"
|
||||
path.s3tc="res://.godot/imported/texture_01.png-1dcf4b27bd12b1fd18e6c870b30bb902.s3tc.ctex"
|
||||
path.etc2="res://.godot/imported/texture_01.png-1dcf4b27bd12b1fd18e6c870b30bb902.etc2.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["etc2_astc"],
|
||||
"imported_formats": ["s3tc_bptc", "etc2_astc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://player_controller/Assets/Textures/GridTexture/Light/texture_01.png"
|
||||
dest_files=["res://.godot/imported/texture_01.png-1dcf4b27bd12b1fd18e6c870b30bb902.etc2.ctex"]
|
||||
dest_files=["res://.godot/imported/texture_01.png-1dcf4b27bd12b1fd18e6c870b30bb902.s3tc.ctex", "res://.godot/imported/texture_01.png-1dcf4b27bd12b1fd18e6c870b30bb902.etc2.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
|
@ -3,16 +3,17 @@
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://t10lfkxrg7ay"
|
||||
path.s3tc="res://.godot/imported/texture_01.png-2d26b48d2dec4e4e9eea4b1c047417c0.s3tc.ctex"
|
||||
path.etc2="res://.godot/imported/texture_01.png-2d26b48d2dec4e4e9eea4b1c047417c0.etc2.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["etc2_astc"],
|
||||
"imported_formats": ["s3tc_bptc", "etc2_astc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://player_controller/Assets/Textures/GridTexture/Orange/texture_01.png"
|
||||
dest_files=["res://.godot/imported/texture_01.png-2d26b48d2dec4e4e9eea4b1c047417c0.etc2.ctex"]
|
||||
dest_files=["res://.godot/imported/texture_01.png-2d26b48d2dec4e4e9eea4b1c047417c0.s3tc.ctex", "res://.godot/imported/texture_01.png-2d26b48d2dec4e4e9eea4b1c047417c0.etc2.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
|
@ -3,16 +3,17 @@
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dgix86l87u86s"
|
||||
path.s3tc="res://.godot/imported/texture_01.png-a7949be0e945f82b88e838fe48a6f350.s3tc.ctex"
|
||||
path.etc2="res://.godot/imported/texture_01.png-a7949be0e945f82b88e838fe48a6f350.etc2.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["etc2_astc"],
|
||||
"imported_formats": ["s3tc_bptc", "etc2_astc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://player_controller/Assets/Textures/GridTexture/Red/texture_01.png"
|
||||
dest_files=["res://.godot/imported/texture_01.png-a7949be0e945f82b88e838fe48a6f350.etc2.ctex"]
|
||||
dest_files=["res://.godot/imported/texture_01.png-a7949be0e945f82b88e838fe48a6f350.s3tc.ctex", "res://.godot/imported/texture_01.png-a7949be0e945f82b88e838fe48a6f350.etc2.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
|
@ -3,16 +3,17 @@
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://woq2hudxhckr"
|
||||
path.s3tc="res://.godot/imported/Gabor 1 - 512x512.png-35241d8f4670c338b8c89a271f5b5891.s3tc.ctex"
|
||||
path.etc2="res://.godot/imported/Gabor 1 - 512x512.png-35241d8f4670c338b8c89a271f5b5891.etc2.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["etc2_astc"],
|
||||
"imported_formats": ["s3tc_bptc", "etc2_astc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://player_controller/Assets/Textures/PerlinNoise/Gabor 1 - 512x512.png"
|
||||
dest_files=["res://.godot/imported/Gabor 1 - 512x512.png-35241d8f4670c338b8c89a271f5b5891.etc2.ctex"]
|
||||
dest_files=["res://.godot/imported/Gabor 1 - 512x512.png-35241d8f4670c338b8c89a271f5b5891.s3tc.ctex", "res://.godot/imported/Gabor 1 - 512x512.png-35241d8f4670c338b8c89a271f5b5891.etc2.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
|
@ -3,16 +3,17 @@
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://lp2pt8mtj7ty"
|
||||
path.s3tc="res://.godot/imported/kenney-green-checkerboar-cc0.png-2ce8609a39a655125c8e037014f6f2db.s3tc.ctex"
|
||||
path.etc2="res://.godot/imported/kenney-green-checkerboar-cc0.png-2ce8609a39a655125c8e037014f6f2db.etc2.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["etc2_astc"],
|
||||
"imported_formats": ["s3tc_bptc", "etc2_astc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://player_controller/Examples/MovementTestbed/Hills/kenney-green-checkerboar-cc0.png"
|
||||
dest_files=["res://.godot/imported/kenney-green-checkerboar-cc0.png-2ce8609a39a655125c8e037014f6f2db.etc2.ctex"]
|
||||
dest_files=["res://.godot/imported/kenney-green-checkerboar-cc0.png-2ce8609a39a655125c8e037014f6f2db.s3tc.ctex", "res://.godot/imported/kenney-green-checkerboar-cc0.png-2ce8609a39a655125c8e037014f6f2db.etc2.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
|
@ -141,7 +141,7 @@ script = ExtResource("27_34snm")
|
||||
[node name="ToAiming" type="Node" parent="StateChart/Root/WeaponInHand"]
|
||||
script = ExtResource("28_n7qhm")
|
||||
to = NodePath("../../Aiming")
|
||||
event = &"aim_triggered"
|
||||
event = &"aim_pressed"
|
||||
delay_in_seconds = "0.0"
|
||||
|
||||
[node name="Aiming" type="Node" parent="StateChart/Root"]
|
||||
@ -162,7 +162,7 @@ delay_in_seconds = "0.0"
|
||||
[node name="ToWeaponThrown" type="Node" parent="StateChart/Root/Aiming"]
|
||||
script = ExtResource("28_n7qhm")
|
||||
to = NodePath("../../WeaponThrown")
|
||||
event = &"hit_triggered"
|
||||
event = &"hit_pressed"
|
||||
delay_in_seconds = "0.0"
|
||||
|
||||
[node name="Dashing" type="Node" parent="StateChart/Root"]
|
||||
@ -171,7 +171,7 @@ script = ExtResource("27_34snm")
|
||||
[node name="ToWeaponInHand" type="Node" parent="StateChart/Root/Dashing"]
|
||||
script = ExtResource("28_n7qhm")
|
||||
to = NodePath("../../WeaponInHand")
|
||||
event = &"dash_finished"
|
||||
event = &"dash_ended"
|
||||
delay_in_seconds = "0.0"
|
||||
|
||||
[node name="WeaponThrown" type="Node" parent="StateChart/Root"]
|
||||
@ -180,7 +180,7 @@ script = ExtResource("27_34snm")
|
||||
[node name="ToDashing" type="Node" parent="StateChart/Root/WeaponThrown"]
|
||||
script = ExtResource("28_n7qhm")
|
||||
to = NodePath("../../Dashing")
|
||||
event = &"aim_started"
|
||||
event = &"aim_pressed"
|
||||
delay_in_seconds = "0.0"
|
||||
|
||||
[connection signal="input_aim_canceled" from="InputController" to="." method="OnInputAimCanceled"]
|
||||
|
@ -110,6 +110,7 @@ public partial class PlayerController : CharacterBody3D
|
||||
|
||||
DashSystem = GetNode<DashSystem>("DashSystem");
|
||||
DashSystem.Init(HeadSystem, camera, TweenQueueSystem);
|
||||
DashSystem.DashEnded += OnDashEnded;
|
||||
|
||||
HealthSystem = GetNode<HealthSystem>("HealthSystem");
|
||||
|
||||
@ -143,7 +144,7 @@ public partial class PlayerController : CharacterBody3D
|
||||
|
||||
public void OnInputAimPressed()
|
||||
{
|
||||
PlayerState.SendEvent("aim_started");
|
||||
PlayerState.SendEvent("aim_pressed");
|
||||
|
||||
if (_dashCanceled)
|
||||
return;
|
||||
@ -152,19 +153,21 @@ public partial class PlayerController : CharacterBody3D
|
||||
}
|
||||
public void OnInputAimReleased()
|
||||
{
|
||||
PlayerState.SendEvent("aim_released");
|
||||
if (!_dashCanceled)
|
||||
DashSystem.Dash();
|
||||
_dashCanceled = false;
|
||||
}
|
||||
public void OnInputAimCanceled()
|
||||
{
|
||||
PlayerState.SendEvent("aim_canceled");
|
||||
_dashCanceled = true;
|
||||
DashSystem.CancelDash();
|
||||
}
|
||||
|
||||
public void OnInputHitPressed()
|
||||
{
|
||||
GD.Print("OnInputHitPressed");
|
||||
PlayerState.SendEvent("hit_pressed");
|
||||
}
|
||||
|
||||
public void OnInputJumpPressed()
|
||||
@ -176,6 +179,11 @@ public partial class PlayerController : CharacterBody3D
|
||||
MoveSystem.Jump(IsOnFloor());
|
||||
}
|
||||
|
||||
public void OnDashEnded()
|
||||
{
|
||||
PlayerState.SendEvent("dash_ended");
|
||||
}
|
||||
|
||||
public override void _PhysicsProcess(double delta)
|
||||
{
|
||||
TweenQueueSystem.ProcessTweens();
|
||||
|
Reference in New Issue
Block a user