diff --git a/SwordNGun/Content/Characters/Enemies/TestEnemy/States/BP_EnemyAirborneState.uasset b/SwordNGun/Content/Characters/Enemies/TestEnemy/States/BP_EnemyAirborneState.uasset index aee1310..55cd338 100644 --- a/SwordNGun/Content/Characters/Enemies/TestEnemy/States/BP_EnemyAirborneState.uasset +++ b/SwordNGun/Content/Characters/Enemies/TestEnemy/States/BP_EnemyAirborneState.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cfea28a466f32e5675305cf4e53d71e4ca6f1207bac7ac2acae816a9a7fe4886 -size 32545 +oid sha256:69319efcbd60c54eb8bd7038fcb7cab2c9f035b2d819289ef87fc9fd321c3178 +size 32550 diff --git a/SwordNGun/Content/Characters/Protagonist/BP_Protagonist.uasset b/SwordNGun/Content/Characters/Protagonist/BP_Protagonist.uasset index 1fc2fc3..071b282 100644 --- a/SwordNGun/Content/Characters/Protagonist/BP_Protagonist.uasset +++ b/SwordNGun/Content/Characters/Protagonist/BP_Protagonist.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4036da7e79b7b135a3dca6438498520c03f9d7c8019420931f287867cab4acbe -size 203309 +oid sha256:70a8c618354ff48e7b394e84b0979e44ea8675c4249f44a8499922c16911ed5f +size 199280 diff --git a/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagAirAttack1.uasset b/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagAirAttack1.uasset deleted file mode 100644 index a9f0bcc..0000000 --- a/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagAirAttack1.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:49081688cfa71ee1c375bff117bcd5a7ba91a3794bc8ca17a4723d7499d7e37a -size 112498 diff --git a/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagAirAttack2.uasset b/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagAirAttack2.uasset deleted file mode 100644 index 3e6214f..0000000 --- a/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagAirAttack2.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:25953b09b7ca0b852c4a9995acd347c2bcca23e107dc6732cd1e1b397ab31f80 -size 116770 diff --git a/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagAirAttack3.uasset b/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagAirAttack3.uasset deleted file mode 100644 index 2fe1f88..0000000 --- a/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagAirAttack3.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fa8b2f3728e9eb8d9c87112377ee2ecd9750c56ec1d7e0e1f4809e0555578d40 -size 116250 diff --git a/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagAirAttack4.uasset b/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagAirAttack4.uasset deleted file mode 100644 index 4c3129e..0000000 --- a/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagAirAttack4.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:39bdd98a225a03fa6c24c48ed4b7b35a6194d504a7b734f871f8d11f4ebc5d59 -size 112975 diff --git a/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagAirAttacking.uasset b/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagAirAttacking.uasset deleted file mode 100644 index d96383d..0000000 --- a/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagAirAttacking.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9811d756d08929997b80b4052ba17e81982a95ed62ea66900e373fb278bbaad1 -size 36378 diff --git a/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagAirDashState.uasset b/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagAirDashState.uasset deleted file mode 100644 index 01f5f05..0000000 --- a/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagAirDashState.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b204c4545ee28b3e859ae14569fbb8a99df18c8b53407d6036141b63c636aa85 -size 278741 diff --git a/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagAirFiringWeaponState.uasset b/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagAirFiringWeaponState.uasset deleted file mode 100644 index 3f7f784..0000000 --- a/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagAirFiringWeaponState.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4fa4cf5ee4323faeca195f240d21cbcff4e22ac1e9c0210200da5dd57be7c562 -size 170489 diff --git a/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagAirJump.uasset b/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagAirJump.uasset deleted file mode 100644 index 502f20d..0000000 --- a/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagAirJump.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2425707101fffd6a7888baa49fd9f1113f0159bd14210918139e28ed149f9cbf -size 59969 diff --git a/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagAirborneState.uasset b/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagAirborneState.uasset deleted file mode 100644 index b21a7a0..0000000 --- a/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagAirborneState.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f55ccb0a80f8706a15f531d999d3f141436cf6f6e070d87d0c252f9370432ea6 -size 135428 diff --git a/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagAttacking.uasset b/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagAttacking.uasset index d7a377e..109fdc0 100644 --- a/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagAttacking.uasset +++ b/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagAttacking.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:437d631c4cc0cb2d4b0d8439864bd5ab7ab775617f89a14033766229db560922 -size 2501 +oid sha256:9334541443e9cf382ad5b5d0edaaef93b09deaa04e6ad8464bd6284ef943ef9e +size 2517 diff --git a/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagDashStab.uasset b/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagDashStab.uasset deleted file mode 100644 index ab033ae..0000000 --- a/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagDashStab.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4e5b1a18210f6c27dee6690bb21871298843b90ed125c5817e25e25a346e2138 -size 31654 diff --git a/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagDashStabEnd.uasset b/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagDashStabEnd.uasset deleted file mode 100644 index 28a8a18..0000000 --- a/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagDashStabEnd.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8dbd7648858ae8c2499a5645461063c454b240f8e9e898ed97dbe5d0d923832a -size 55278 diff --git a/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagDashStabStart.uasset b/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagDashStabStart.uasset deleted file mode 100644 index 54aa3dc..0000000 --- a/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagDashStabStart.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9ee5d589a8acf4d44f5f0ff372100a42b88f9b16af081feae8bb2cacf0dd3edb -size 100840 diff --git a/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagDashState.uasset b/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagDashState.uasset deleted file mode 100644 index 49d10f4..0000000 --- a/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagDashState.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c19678ac56a2415c81786bb61e1e38382eba6fc8aa833d1a980d233c7492232b -size 202675 diff --git a/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagDead.uasset b/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagDead.uasset deleted file mode 100644 index 74db207..0000000 --- a/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagDead.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:cb2feaaa25d4df7bf84e0b1bf3ce70d37fc718b6b9214b0d296aa80f0b948395 -size 5457 diff --git a/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagFiringWeaponState.uasset b/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagFiringWeaponState.uasset deleted file mode 100644 index b5de20c..0000000 --- a/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagFiringWeaponState.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e61ffc4c8113f364b71258d54f7cc83c3cc612045a0b1025c4db25f52f18db5e -size 162416 diff --git a/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagGroundAttack1.uasset b/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagGroundAttack1.uasset deleted file mode 100644 index 7e32959..0000000 --- a/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagGroundAttack1.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:58a4e2c7bd590545dfdda4a2f1bc4b3482f5ee09f0e0bfd684433392c755a6e3 -size 89223 diff --git a/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagGroundAttack2.uasset b/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagGroundAttack2.uasset deleted file mode 100644 index a070415..0000000 --- a/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagGroundAttack2.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d0c786743a96096101369f0444c402d1dee612b940c21a613ba2905a153c7687 -size 89117 diff --git a/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagGroundAttack3.uasset b/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagGroundAttack3.uasset deleted file mode 100644 index 380bd71..0000000 --- a/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagGroundAttack3.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:319eb7a72a6c9ec4a89d3b0ed57be4c131df889b91151c1d73a3b120fc57c73f -size 52379 diff --git a/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagGroundAttack3_New.uasset b/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagGroundAttack3_New.uasset index a79d486..43aeefc 100644 --- a/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagGroundAttack3_New.uasset +++ b/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagGroundAttack3_New.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:71ac5532491241c5a14ba5f226dbce87cc68de47a70ca620ef3c17b45453d09c -size 2559 +oid sha256:054027cacc8a4b49eeda11b60662e5b2512d4d14f69bf596b1e814af0490ffbd +size 2575 diff --git a/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagGroundAttack4.uasset b/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagGroundAttack4.uasset index 1a81b33..633caa6 100644 --- a/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagGroundAttack4.uasset +++ b/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagGroundAttack4.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:404534ebcbcd84ceb8f79534dce1d26b8d16905c665bda39ba2952021969b8ad -size 2519 +oid sha256:cff767afc7eb8dceb749609c595f3acfbfc8a29607df6de9e389b631815e4d10 +size 2535 diff --git a/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagGroundAttacking.uasset b/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagGroundAttacking.uasset deleted file mode 100644 index 5044cc8..0000000 --- a/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagGroundAttacking.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1538209a548064c97628c46e15dc96b84c388474241c6e9ae1afc883e8035622 -size 59547 diff --git a/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagGroundLauncher.uasset b/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagGroundLauncher.uasset deleted file mode 100644 index 070907b..0000000 --- a/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagGroundLauncher.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2a4ab318e1d9d2d90b2f91ed250d992155580367b013c152398971c28874521d -size 56734 diff --git a/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagGroundedState.uasset b/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagGroundedState.uasset deleted file mode 100644 index b0c9b0b..0000000 --- a/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagGroundedState.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:57747ad0720e9a930eea48673795eb885efb66875e678da46fcbd38555aa3b6c -size 247250 diff --git a/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagHit.uasset b/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagHit.uasset deleted file mode 100644 index 2881eb1..0000000 --- a/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagHit.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:56ef1181e85e76b93a39bc0629305334b39fbf41d7910dba9aa839b0176264e3 -size 5836 diff --git a/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagHitStun.uasset b/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagHitStun.uasset deleted file mode 100644 index 4e7d2de..0000000 --- a/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagHitStun.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b213a0fa9edde2b8a38f5810abea497065b0f2d069b94d789ad736bde8ca6fdc -size 72831 diff --git a/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagIdleState.uasset b/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagIdleState.uasset deleted file mode 100644 index 3b3850c..0000000 --- a/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagIdleState.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a3d64ecaa369f3ff2a6b1fd584dab45a88e752a54632702ad6942e61cc6b53db -size 29756 diff --git a/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagJump.uasset b/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagJump.uasset deleted file mode 100644 index b99716f..0000000 --- a/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagJump.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:80deb3ede0f119d618d25ffeb2b32ecd1c049b4a5b17fce383b242a0e0575d7c -size 90201 diff --git a/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagReloadState.uasset b/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagReloadState.uasset deleted file mode 100644 index e1acecb..0000000 --- a/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagReloadState.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8e09d51570b3eade7d513be99303288898bc6c50a8b0fe61dd66b8c1ee36059a -size 107874 diff --git a/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagRootState.uasset b/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagRootState.uasset deleted file mode 100644 index 209da8d..0000000 --- a/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagRootState.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:90bb85eb721d5aed6195fda41d3bab692366054f38dd00deaece337e8425e1b9 -size 31195 diff --git a/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagWalkJogState.uasset b/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagWalkJogState.uasset index 79affa3..be79be6 100644 --- a/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagWalkJogState.uasset +++ b/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagWalkJogState.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d86eb36fd02342fd3eb10fb003725708d52e81ea6bf2e1c23b26cd262d76d5d8 -size 2465 +oid sha256:85790c50b046921a0e0bfc6bda75da08ee979a095ccd1732ccb9dbccc2a2974e +size 2481 diff --git a/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagWalkState.uasset b/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagWalkState.uasset deleted file mode 100644 index 2e926cb..0000000 --- a/SwordNGun/Content/Characters/Protagonist/States/BP_ProtagWalkState.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7a5de095c28d291c764de0a3560d41fc5dbe39fd4ae1b1117d209adb408749eb -size 29696 diff --git a/SwordNGun/Content/Characters/Protagonist/States/OLD/BP_ProtagAirAttack1.uasset b/SwordNGun/Content/Characters/Protagonist/States/OLD/BP_ProtagAirAttack1.uasset new file mode 100644 index 0000000..9516fb4 --- /dev/null +++ b/SwordNGun/Content/Characters/Protagonist/States/OLD/BP_ProtagAirAttack1.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1d38df6d453b37a26839751e281f78f35c26f80891905552e7c57c73d8dbc5c0 +size 111811 diff --git a/SwordNGun/Content/Characters/Protagonist/States/OLD/BP_ProtagAirAttack2.uasset b/SwordNGun/Content/Characters/Protagonist/States/OLD/BP_ProtagAirAttack2.uasset new file mode 100644 index 0000000..e2d213f --- /dev/null +++ b/SwordNGun/Content/Characters/Protagonist/States/OLD/BP_ProtagAirAttack2.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e14030adf6c80a7683dcdad88e3149deb90db4f474bbee58e356a41191506cc1 +size 115716 diff --git a/SwordNGun/Content/Characters/Protagonist/States/OLD/BP_ProtagAirAttack3.uasset b/SwordNGun/Content/Characters/Protagonist/States/OLD/BP_ProtagAirAttack3.uasset new file mode 100644 index 0000000..687499b --- /dev/null +++ b/SwordNGun/Content/Characters/Protagonist/States/OLD/BP_ProtagAirAttack3.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:91795d3970987d3a71c5971e30ce9b4c3d0193fa98ae78f5ff31bf9dda342a15 +size 115503 diff --git a/SwordNGun/Content/Characters/Protagonist/States/OLD/BP_ProtagAirAttack4.uasset b/SwordNGun/Content/Characters/Protagonist/States/OLD/BP_ProtagAirAttack4.uasset new file mode 100644 index 0000000..aa25570 --- /dev/null +++ b/SwordNGun/Content/Characters/Protagonist/States/OLD/BP_ProtagAirAttack4.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cb140349cf696af388bcb347a14c89cf9b2905305f66891e091c88495cafd997 +size 112324 diff --git a/SwordNGun/Content/Characters/Protagonist/States/OLD/BP_ProtagAirAttacking.uasset b/SwordNGun/Content/Characters/Protagonist/States/OLD/BP_ProtagAirAttacking.uasset new file mode 100644 index 0000000..3012dce --- /dev/null +++ b/SwordNGun/Content/Characters/Protagonist/States/OLD/BP_ProtagAirAttacking.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ab56686ce5d5a911943f9193abca87e2f576e2482dc4514c21c42345bc918e0f +size 38475 diff --git a/SwordNGun/Content/Characters/Protagonist/States/OLD/BP_ProtagAirDashState.uasset b/SwordNGun/Content/Characters/Protagonist/States/OLD/BP_ProtagAirDashState.uasset new file mode 100644 index 0000000..aaebec1 --- /dev/null +++ b/SwordNGun/Content/Characters/Protagonist/States/OLD/BP_ProtagAirDashState.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f0eadd375f2cfec591a273fbdf24389af5fd2901053ab828293b235eee229fde +size 275480 diff --git a/SwordNGun/Content/Characters/Protagonist/States/OLD/BP_ProtagAirFiringWeaponState.uasset b/SwordNGun/Content/Characters/Protagonist/States/OLD/BP_ProtagAirFiringWeaponState.uasset new file mode 100644 index 0000000..5f70fea --- /dev/null +++ b/SwordNGun/Content/Characters/Protagonist/States/OLD/BP_ProtagAirFiringWeaponState.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:12d96712029d78cc0bd05d716e906236ec48b564f329482e74c3bbbcbd32fad7 +size 173096 diff --git a/SwordNGun/Content/Characters/Protagonist/States/OLD/BP_ProtagAirJump.uasset b/SwordNGun/Content/Characters/Protagonist/States/OLD/BP_ProtagAirJump.uasset new file mode 100644 index 0000000..1e2048d --- /dev/null +++ b/SwordNGun/Content/Characters/Protagonist/States/OLD/BP_ProtagAirJump.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fca95befd9ad225c5a559bc3db1bb360f3e24508cc9545e7cb673ecd8cbc1c7b +size 60599 diff --git a/SwordNGun/Content/Characters/Protagonist/States/OLD/BP_ProtagAirborneState.uasset b/SwordNGun/Content/Characters/Protagonist/States/OLD/BP_ProtagAirborneState.uasset new file mode 100644 index 0000000..a6ad86a --- /dev/null +++ b/SwordNGun/Content/Characters/Protagonist/States/OLD/BP_ProtagAirborneState.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5a0f7aac567a51ab4296badb7f953ae53cf9eb92354dcc8a98d3ac603b3877ca +size 132683 diff --git a/SwordNGun/Content/Characters/Protagonist/States/OLD/BP_ProtagDashStab.uasset b/SwordNGun/Content/Characters/Protagonist/States/OLD/BP_ProtagDashStab.uasset new file mode 100644 index 0000000..22886c0 --- /dev/null +++ b/SwordNGun/Content/Characters/Protagonist/States/OLD/BP_ProtagDashStab.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9a2909d7d07280954e54c0eeee2513e4625ee1baf7922536550acaae9ef26cbf +size 34719 diff --git a/SwordNGun/Content/Characters/Protagonist/States/OLD/BP_ProtagDashStabEnd.uasset b/SwordNGun/Content/Characters/Protagonist/States/OLD/BP_ProtagDashStabEnd.uasset new file mode 100644 index 0000000..6d360c2 --- /dev/null +++ b/SwordNGun/Content/Characters/Protagonist/States/OLD/BP_ProtagDashStabEnd.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f77cbff2b61c78a9e8a04682a1ad31b7392cda7a613c62a33d6d0969131bdacc +size 55374 diff --git a/SwordNGun/Content/Characters/Protagonist/States/OLD/BP_ProtagDashStabStart.uasset b/SwordNGun/Content/Characters/Protagonist/States/OLD/BP_ProtagDashStabStart.uasset new file mode 100644 index 0000000..fe6f039 --- /dev/null +++ b/SwordNGun/Content/Characters/Protagonist/States/OLD/BP_ProtagDashStabStart.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0fd4e675236354ba9c00eed73a7e4c529e3a5fdd5c8ae849da8233b9b9f9a4c1 +size 100430 diff --git a/SwordNGun/Content/Characters/Protagonist/States/OLD/BP_ProtagDashState.uasset b/SwordNGun/Content/Characters/Protagonist/States/OLD/BP_ProtagDashState.uasset new file mode 100644 index 0000000..1f27b98 --- /dev/null +++ b/SwordNGun/Content/Characters/Protagonist/States/OLD/BP_ProtagDashState.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c1ef772b03755c4f0a3b4ec5a8565a127b1bd6404ae3e235b903eefa4945048c +size 202465 diff --git a/SwordNGun/Content/Characters/Protagonist/States/OLD/BP_ProtagDead.uasset b/SwordNGun/Content/Characters/Protagonist/States/OLD/BP_ProtagDead.uasset new file mode 100644 index 0000000..1e3b5c1 --- /dev/null +++ b/SwordNGun/Content/Characters/Protagonist/States/OLD/BP_ProtagDead.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ce3eee0e1d76e026866c3d11e287c6746296e0aee992d174862fdb24f95ba2d9 +size 5469 diff --git a/SwordNGun/Content/Characters/Protagonist/States/OLD/BP_ProtagFiringWeaponState.uasset b/SwordNGun/Content/Characters/Protagonist/States/OLD/BP_ProtagFiringWeaponState.uasset new file mode 100644 index 0000000..8f5f999 --- /dev/null +++ b/SwordNGun/Content/Characters/Protagonist/States/OLD/BP_ProtagFiringWeaponState.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cc590d29ff8c860beaf1bea4ec85da211705f4dd7bac67aeaafd71f4438e4a57 +size 165250 diff --git a/SwordNGun/Content/Characters/Protagonist/States/OLD/BP_ProtagGroundAttack1.uasset b/SwordNGun/Content/Characters/Protagonist/States/OLD/BP_ProtagGroundAttack1.uasset new file mode 100644 index 0000000..0f443a8 --- /dev/null +++ b/SwordNGun/Content/Characters/Protagonist/States/OLD/BP_ProtagGroundAttack1.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c70b95e9ca593624d8d82a38b938b88846c29e7fe14981ccf889b6d0a88674da +size 90448 diff --git a/SwordNGun/Content/Characters/Protagonist/States/OLD/BP_ProtagGroundAttack2.uasset b/SwordNGun/Content/Characters/Protagonist/States/OLD/BP_ProtagGroundAttack2.uasset new file mode 100644 index 0000000..3a8fee1 --- /dev/null +++ b/SwordNGun/Content/Characters/Protagonist/States/OLD/BP_ProtagGroundAttack2.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:884ca8c825c21c93b25a2707ce0f0087189d1f5a1577178db2c7b2f43ae78b99 +size 90342 diff --git a/SwordNGun/Content/Characters/Protagonist/States/OLD/BP_ProtagGroundAttack3.uasset b/SwordNGun/Content/Characters/Protagonist/States/OLD/BP_ProtagGroundAttack3.uasset new file mode 100644 index 0000000..7aa54fe --- /dev/null +++ b/SwordNGun/Content/Characters/Protagonist/States/OLD/BP_ProtagGroundAttack3.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d9c099f16d5d8a303a702cee5c0195fbc331b9b1e7b24b42f97534d4c68d7e61 +size 52811 diff --git a/SwordNGun/Content/Characters/Protagonist/States/OLD/BP_ProtagGroundAttacking.uasset b/SwordNGun/Content/Characters/Protagonist/States/OLD/BP_ProtagGroundAttacking.uasset new file mode 100644 index 0000000..f8d9c59 --- /dev/null +++ b/SwordNGun/Content/Characters/Protagonist/States/OLD/BP_ProtagGroundAttacking.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b9cb9a1c5901fc607222326405f14a7bc50a70480fa3f6e769ee1a61cb8856fd +size 61049 diff --git a/SwordNGun/Content/Characters/Protagonist/States/OLD/BP_ProtagGroundLauncher.uasset b/SwordNGun/Content/Characters/Protagonist/States/OLD/BP_ProtagGroundLauncher.uasset new file mode 100644 index 0000000..2a2fff0 --- /dev/null +++ b/SwordNGun/Content/Characters/Protagonist/States/OLD/BP_ProtagGroundLauncher.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:feaf02e83faa87bee49d2b82aa75a10955c023402ee5edf5d653367c4f75d804 +size 57076 diff --git a/SwordNGun/Content/Characters/Protagonist/States/OLD/BP_ProtagGroundedState.uasset b/SwordNGun/Content/Characters/Protagonist/States/OLD/BP_ProtagGroundedState.uasset new file mode 100644 index 0000000..94d2baf --- /dev/null +++ b/SwordNGun/Content/Characters/Protagonist/States/OLD/BP_ProtagGroundedState.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1e2ced64e264ffbe1dd5e78713e7ae7028596cd373a2e8825c6c541aa4d212da +size 251790 diff --git a/SwordNGun/Content/Characters/Protagonist/States/OLD/BP_ProtagHit.uasset b/SwordNGun/Content/Characters/Protagonist/States/OLD/BP_ProtagHit.uasset new file mode 100644 index 0000000..97f2104 --- /dev/null +++ b/SwordNGun/Content/Characters/Protagonist/States/OLD/BP_ProtagHit.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cbaa18691dda543a61d0719868708e181fd18d073a68a9e943c858c934064b21 +size 5856 diff --git a/SwordNGun/Content/Characters/Protagonist/States/OLD/BP_ProtagHitStun.uasset b/SwordNGun/Content/Characters/Protagonist/States/OLD/BP_ProtagHitStun.uasset new file mode 100644 index 0000000..b4ad252 --- /dev/null +++ b/SwordNGun/Content/Characters/Protagonist/States/OLD/BP_ProtagHitStun.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d5a9f406f3ced00336c702b1b33fc89c22222adc51127cb19647e86f01337831 +size 76565 diff --git a/SwordNGun/Content/Characters/Protagonist/States/OLD/BP_ProtagIdleState.uasset b/SwordNGun/Content/Characters/Protagonist/States/OLD/BP_ProtagIdleState.uasset new file mode 100644 index 0000000..2f18775 --- /dev/null +++ b/SwordNGun/Content/Characters/Protagonist/States/OLD/BP_ProtagIdleState.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ad4b02b66f66a70201e9d6f59041eac7789b427e334e8fd70861ef5104869512 +size 29734 diff --git a/SwordNGun/Content/Characters/Protagonist/States/OLD/BP_ProtagJump.uasset b/SwordNGun/Content/Characters/Protagonist/States/OLD/BP_ProtagJump.uasset new file mode 100644 index 0000000..c162b8f --- /dev/null +++ b/SwordNGun/Content/Characters/Protagonist/States/OLD/BP_ProtagJump.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b448e4988e3574b476a7040139e2deb3f7ef2ec251432bb2c2be596104ed3d9d +size 89005 diff --git a/SwordNGun/Content/Characters/Protagonist/States/OLD/BP_ProtagReloadState.uasset b/SwordNGun/Content/Characters/Protagonist/States/OLD/BP_ProtagReloadState.uasset new file mode 100644 index 0000000..30dbfab --- /dev/null +++ b/SwordNGun/Content/Characters/Protagonist/States/OLD/BP_ProtagReloadState.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3a3f2a6de5ffdd2ead68391f286fde26675a1dc56c2f5645dc45163273616836 +size 110023 diff --git a/SwordNGun/Content/Characters/Protagonist/States/OLD/BP_ProtagRootState.uasset b/SwordNGun/Content/Characters/Protagonist/States/OLD/BP_ProtagRootState.uasset new file mode 100644 index 0000000..0a2065d --- /dev/null +++ b/SwordNGun/Content/Characters/Protagonist/States/OLD/BP_ProtagRootState.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:46e3882844fecb937b4b30b603f4b13cf367be489d1af898c24c54f5233d0670 +size 32959 diff --git a/SwordNGun/Content/Characters/Protagonist/States/OLD/BP_ProtagWalkState.uasset b/SwordNGun/Content/Characters/Protagonist/States/OLD/BP_ProtagWalkState.uasset new file mode 100644 index 0000000..8fcb511 --- /dev/null +++ b/SwordNGun/Content/Characters/Protagonist/States/OLD/BP_ProtagWalkState.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0d9d82698b86d58f6106491a90358ff2c4ca5ba96de5f4a74c1f573baba3f47d +size 29713 diff --git a/SwordNGun/Source/SwordNGun/Private/Characters/SNGCharacterBase.cpp b/SwordNGun/Source/SwordNGun/Private/Characters/SNGCharacterBase.cpp index 224dd45..e525966 100644 --- a/SwordNGun/Source/SwordNGun/Private/Characters/SNGCharacterBase.cpp +++ b/SwordNGun/Source/SwordNGun/Private/Characters/SNGCharacterBase.cpp @@ -6,6 +6,7 @@ #include "DrawDebugHelpers.h" #include "Camera/CameraComponent.h" #include "Components/CapsuleComponent.h" +#include "Components/InputComponent.h" #include "Components/SNGCharacterMovementComponent.h" #include "GameFramework/SpringArmComponent.h" #include "Kismet/KismetMathLibrary.h" diff --git a/SwordNGun/Source/SwordNGun/Private/Characters/SNGProtagonist.cpp b/SwordNGun/Source/SwordNGun/Private/Characters/SNGProtagonist.cpp index adf9e2f..2ad33ff 100644 --- a/SwordNGun/Source/SwordNGun/Private/Characters/SNGProtagonist.cpp +++ b/SwordNGun/Source/SwordNGun/Private/Characters/SNGProtagonist.cpp @@ -4,6 +4,7 @@ #include "Characters/SNGProtagonist.h" #include "DrawDebugHelpers.h" +#include "Animation/AnimInstance.h" #include "GameFramework/CharacterMovementComponent.h" #include "Kismet/KismetMathLibrary.h" #include "Kismet/KismetSystemLibrary.h" diff --git a/SwordNGun/Source/SwordNGun/Private/States/SNGEnemyBaseState.cpp b/SwordNGun/Source/SwordNGun/Private/States/OLD/SNGEnemyBaseState.cpp similarity index 84% rename from SwordNGun/Source/SwordNGun/Private/States/SNGEnemyBaseState.cpp rename to SwordNGun/Source/SwordNGun/Private/States/OLD/SNGEnemyBaseState.cpp index 53cd782..41c1066 100644 --- a/SwordNGun/Source/SwordNGun/Private/States/SNGEnemyBaseState.cpp +++ b/SwordNGun/Source/SwordNGun/Private/States/OLD/SNGEnemyBaseState.cpp @@ -1,15 +1,15 @@ -// Project Sword & Gun Copyright © 2021 Kevin Poretti - - -#include "States/SNGEnemyBaseState.h" - -void USNGEnemyBaseState::SetOwner(AActor* StateOwner) -{ - Super::SetOwner(StateOwner); - - Enemy = Cast(StateOwner); - if(!Enemy) - { - UE_LOG(LogTemp, Error, TEXT("SNGEnemyBaseState :: Could not cast state owner to SNGEnemyBase")); - } -} +// Project Sword & Gun Copyright © 2021 Kevin Poretti + + +#include "States/OLD/SNGEnemyBaseState.h" + +void USNGEnemyBaseState::SetOwner(AActor* StateOwner) +{ + Super::SetOwner(StateOwner); + + Enemy = Cast(StateOwner); + if(!Enemy) + { + UE_LOG(LogTemp, Error, TEXT("SNGEnemyBaseState :: Could not cast state owner to SNGEnemyBase")); + } +} diff --git a/SwordNGun/Source/SwordNGun/Private/States/SNGProtagonistState.cpp b/SwordNGun/Source/SwordNGun/Private/States/OLD/SNGProtagonistState.cpp similarity index 84% rename from SwordNGun/Source/SwordNGun/Private/States/SNGProtagonistState.cpp rename to SwordNGun/Source/SwordNGun/Private/States/OLD/SNGProtagonistState.cpp index 3906ec5..b3302a6 100644 --- a/SwordNGun/Source/SwordNGun/Private/States/SNGProtagonistState.cpp +++ b/SwordNGun/Source/SwordNGun/Private/States/OLD/SNGProtagonistState.cpp @@ -1,15 +1,15 @@ -// Project Sword & Gun Copyright © 2021 Kevin Poretti - - -#include "States/SNGProtagonistState.h" - -void USNGProtagonistState::SetOwner(AActor* StateOwner) -{ - Super::SetOwner(StateOwner); - - Protagonist = Cast(StateOwner); - if(!Protagonist) - { - UE_LOG(LogTemp, Error, TEXT("SNGProtagonistState :: Could not cast state owner to SNGProtagonist")); - } -} +// Project Sword & Gun Copyright © 2021 Kevin Poretti + + +#include "States/OLD/SNGProtagonistState.h" + +void USNGProtagonistState::SetOwner(AActor* StateOwner) +{ + Super::SetOwner(StateOwner); + + Protagonist = Cast(StateOwner); + if(!Protagonist) + { + UE_LOG(LogTemp, Error, TEXT("SNGProtagonistState :: Could not cast state owner to SNGProtagonist")); + } +} diff --git a/SwordNGun/Source/SwordNGun/Private/States/SNGState.cpp b/SwordNGun/Source/SwordNGun/Private/States/OLD/SNGState.cpp similarity index 94% rename from SwordNGun/Source/SwordNGun/Private/States/SNGState.cpp rename to SwordNGun/Source/SwordNGun/Private/States/OLD/SNGState.cpp index 8c6c7b6..6b2e4d1 100644 --- a/SwordNGun/Source/SwordNGun/Private/States/SNGState.cpp +++ b/SwordNGun/Source/SwordNGun/Private/States/OLD/SNGState.cpp @@ -1,204 +1,204 @@ -// Project Sword & Gun Copyright © 2021 Kevin Poretti - - -#include "States/SNGState.h" - -USNGState::USNGState() -{ - Name = NAME_None; - TimeInState = 0.0f; - bCanTransitionToItself = false; - DefaultSubStateIndex = 0; -} - -void USNGState::RegisterTransition(FName DestState, FName TransitionRuleFunctionName) -{ - - FStateTransitionRule StateTransitionRule; - StateTransitionRule.BindUFunction(this, TransitionRuleFunctionName); - - if(!Transitions.Contains(DestState)) - { - Transitions.Add(DestState, StateTransitionRule); - } - else - { - UE_LOG(LogTemp, Warning, TEXT("USNGState :: Transition dictionary already contains transition rule for destination state %s"), *DestState.ToString()); - } -} - -void USNGState::RegisterEventHandler(ESNGEventType EventType, FName EventHandlerFunctionName) -{ - FEventHandlerRule EventHandlerRule; - EventHandlerRule.BindUFunction(this, EventHandlerFunctionName); - - if(Handlers.Contains(EventType)) - { - Handlers[EventType].Add(EventHandlerRule); - } - else - { - Handlers.Add(EventType, TArray()); - Handlers[EventType].Add(EventHandlerRule); - } -} - -FName USNGState::GetNextStateFromEvent(FSNGEvent& Event) -{ - FName DestState = NAME_None; - if(Handlers.Contains(Event.EventType)) - { - for (auto EventHandler : Handlers[Event.EventType]) - { - // FStateTransitionRule is a delegate that returns true if the transition rules are met - // and false otherwise - if(!EventHandler.IsBound()) - { - UE_LOG(LogTemp, Error, TEXT("SNGState :: Tried calling function %s but it is not bound"), *EventHandler.GetFunctionName().ToString()); - continue; - } - - DestState = EventHandler.Execute(Event); - if(DestState != NAME_None) - { - return DestState; - } - } - } - - if(Parent) - { - return Parent->GetNextStateFromEvent(Event); - } - - return NAME_None; -} - -FName USNGState::GetNextState() -{ - // NOTE(kevin): Does this actually have to be a map? - for(const TPair& pair : Transitions) - { - // FStateTransitionRule is a delegate that returns true if the transition rules are met - // and false otherwise - if(!pair.Value.IsBound()) - { - UE_LOG(LogTemp, Error, TEXT("SNGState :: Tried calling function %s but it is not bound"), *pair.Value.GetFunctionName().ToString()); - continue; - } - - if(pair.Value.Execute()) - { - return pair.Key; - } - } - - if(Parent) - { - return Parent->GetNextState(); - } - - return NAME_None; -} - -AActor* USNGState::GetOwner() -{ - return Owner; -} - -void USNGState::SetOwner(AActor* StateOwner) -{ - Owner = StateOwner; -} - -USNGState* USNGState::GetParent() -{ - return Parent; -} - -void USNGState::SetParent(USNGState* ParentState) -{ - this->Parent = ParentState; -} - -uint32 USNGState::GetDepth() -{ - return Depth; -} - -void USNGState::CreateState() -{ - // pre-compute the depth/level of this state during creation - // used later for calculating least common ancestor of two states - uint32 CurrDepth = 0; - USNGState* CurrState = this; - while(CurrState->Parent != nullptr) - { - CurrDepth++; - CurrState = CurrState->Parent; - } - Depth = CurrDepth; - - OnCreateState(); -} - -USNGState* USNGState::EnterState(FSNGEvent& Event) -{ - OnEnterState(Event); - TimeInState = 0.0f; - - if(SubStates.Num() > 0 && - (DefaultSubStateIndex >= 0 && DefaultSubStateIndex < SubStates.Num())) - { - return SubStates[DefaultSubStateIndex]->EnterState(Event); - } - return this; -} - -void USNGState::ExitState() -{ - OnExitState(); - - // to do this correctly i think we need to find the shared parent of the current state and the next state - // we only want to exit states until that point - if(Parent) - { - Parent->ExitState(); - } -} - -void USNGState::UpdateState(float DeltaTime) -{ - OnUpdateState(DeltaTime); - TimeInState += DeltaTime; - - if(Parent) - { - Parent->UpdateState(DeltaTime); - } -} - -FName USNGState::GetName() -{ - return Name; -} - -float USNGState::GetTimeInState() -{ - return TimeInState; -} - -bool USNGState::CanTransitionToItself() -{ - return bCanTransitionToItself; -} - -TArray> USNGState::GetSubStateClasses() -{ - return SubStateClasses; -} - -void USNGState::AddSubState(USNGState* SubState) -{ - SubStates.Add(SubState); -} +// Project Sword & Gun Copyright © 2021 Kevin Poretti + + +#include "States/OLD/SNGState.h" + +USNGState::USNGState() +{ + Name = NAME_None; + TimeInState = 0.0f; + bCanTransitionToItself = false; + DefaultSubStateIndex = 0; +} + +void USNGState::RegisterTransition(FName DestState, FName TransitionRuleFunctionName) +{ + + FStateTransitionRule StateTransitionRule; + StateTransitionRule.BindUFunction(this, TransitionRuleFunctionName); + + if(!Transitions.Contains(DestState)) + { + Transitions.Add(DestState, StateTransitionRule); + } + else + { + UE_LOG(LogTemp, Warning, TEXT("USNGState :: Transition dictionary already contains transition rule for destination state %s"), *DestState.ToString()); + } +} + +void USNGState::RegisterEventHandler(ESNGEventType EventType, FName EventHandlerFunctionName) +{ + FEventHandlerRule EventHandlerRule; + EventHandlerRule.BindUFunction(this, EventHandlerFunctionName); + + if(Handlers.Contains(EventType)) + { + Handlers[EventType].Add(EventHandlerRule); + } + else + { + Handlers.Add(EventType, TArray()); + Handlers[EventType].Add(EventHandlerRule); + } +} + +FName USNGState::GetNextStateFromEvent(FSNGEvent& Event) +{ + FName DestState = NAME_None; + if(Handlers.Contains(Event.EventType)) + { + for (auto EventHandler : Handlers[Event.EventType]) + { + // FStateTransitionRule is a delegate that returns true if the transition rules are met + // and false otherwise + if(!EventHandler.IsBound()) + { + UE_LOG(LogTemp, Error, TEXT("SNGState :: Tried calling function %s but it is not bound"), *EventHandler.GetFunctionName().ToString()); + continue; + } + + DestState = EventHandler.Execute(Event); + if(DestState != NAME_None) + { + return DestState; + } + } + } + + if(Parent) + { + return Parent->GetNextStateFromEvent(Event); + } + + return NAME_None; +} + +FName USNGState::GetNextState() +{ + // NOTE(kevin): Does this actually have to be a map? + for(const TPair& pair : Transitions) + { + // FStateTransitionRule is a delegate that returns true if the transition rules are met + // and false otherwise + if(!pair.Value.IsBound()) + { + UE_LOG(LogTemp, Error, TEXT("SNGState :: Tried calling function %s but it is not bound"), *pair.Value.GetFunctionName().ToString()); + continue; + } + + if(pair.Value.Execute()) + { + return pair.Key; + } + } + + if(Parent) + { + return Parent->GetNextState(); + } + + return NAME_None; +} + +AActor* USNGState::GetOwner() +{ + return Owner; +} + +void USNGState::SetOwner(AActor* StateOwner) +{ + Owner = StateOwner; +} + +USNGState* USNGState::GetParent() +{ + return Parent; +} + +void USNGState::SetParent(USNGState* ParentState) +{ + this->Parent = ParentState; +} + +uint32 USNGState::GetDepth() +{ + return Depth; +} + +void USNGState::CreateState() +{ + // pre-compute the depth/level of this state during creation + // used later for calculating least common ancestor of two states + uint32 CurrDepth = 0; + USNGState* CurrState = this; + while(CurrState->Parent != nullptr) + { + CurrDepth++; + CurrState = CurrState->Parent; + } + Depth = CurrDepth; + + OnCreateState(); +} + +USNGState* USNGState::EnterState(FSNGEvent& Event) +{ + OnEnterState(Event); + TimeInState = 0.0f; + + if(SubStates.Num() > 0 && + (DefaultSubStateIndex >= 0 && DefaultSubStateIndex < SubStates.Num())) + { + return SubStates[DefaultSubStateIndex]->EnterState(Event); + } + return this; +} + +void USNGState::ExitState() +{ + OnExitState(); + + // to do this correctly i think we need to find the shared parent of the current state and the next state + // we only want to exit states until that point + if(Parent) + { + Parent->ExitState(); + } +} + +void USNGState::UpdateState(float DeltaTime) +{ + OnUpdateState(DeltaTime); + TimeInState += DeltaTime; + + if(Parent) + { + Parent->UpdateState(DeltaTime); + } +} + +FName USNGState::GetName() +{ + return Name; +} + +float USNGState::GetTimeInState() +{ + return TimeInState; +} + +bool USNGState::CanTransitionToItself() +{ + return bCanTransitionToItself; +} + +TArray> USNGState::GetSubStateClasses() +{ + return SubStateClasses; +} + +void USNGState::AddSubState(USNGState* SubState) +{ + SubStates.Add(SubState); +} diff --git a/SwordNGun/Source/SwordNGun/Private/States/SNGStateMachine.cpp b/SwordNGun/Source/SwordNGun/Private/States/SNGStateMachine.cpp new file mode 100644 index 0000000..de6e544 Binary files /dev/null and b/SwordNGun/Source/SwordNGun/Private/States/SNGStateMachine.cpp differ diff --git a/SwordNGun/Source/SwordNGun/Private/States/SNGStateMachineFactory.cpp b/SwordNGun/Source/SwordNGun/Private/States/SNGStateMachineFactory.cpp new file mode 100644 index 0000000..8dba239 Binary files /dev/null and b/SwordNGun/Source/SwordNGun/Private/States/SNGStateMachineFactory.cpp differ diff --git a/SwordNGun/Source/SwordNGun/Private/States/SNGStateMachineTypeActions.cpp b/SwordNGun/Source/SwordNGun/Private/States/SNGStateMachineTypeActions.cpp new file mode 100644 index 0000000..ee58c67 Binary files /dev/null and b/SwordNGun/Source/SwordNGun/Private/States/SNGStateMachineTypeActions.cpp differ diff --git a/SwordNGun/Source/SwordNGun/Private/Weapons/SNGInstantRangedWeapon.cpp b/SwordNGun/Source/SwordNGun/Private/Weapons/SNGInstantRangedWeapon.cpp index fc56116..1a120a9 100644 --- a/SwordNGun/Source/SwordNGun/Private/Weapons/SNGInstantRangedWeapon.cpp +++ b/SwordNGun/Source/SwordNGun/Private/Weapons/SNGInstantRangedWeapon.cpp @@ -5,6 +5,7 @@ #include "DrawDebugHelpers.h" #include "Characters/SNGCharacterBase_DEPRECATED.h" +#include "GameFramework/DamageType.h" #include "Kismet/GameplayStatics.h" #include "Particles/ParticleSystemComponent.h" #include "PhysicalMaterials/PhysicalMaterial.h" diff --git a/SwordNGun/Source/SwordNGun/Private/Weapons/SNGMeleeWeaponBase.cpp b/SwordNGun/Source/SwordNGun/Private/Weapons/SNGMeleeWeaponBase.cpp index 6a91ca6..104abfb 100644 --- a/SwordNGun/Source/SwordNGun/Private/Weapons/SNGMeleeWeaponBase.cpp +++ b/SwordNGun/Source/SwordNGun/Private/Weapons/SNGMeleeWeaponBase.cpp @@ -5,6 +5,7 @@ #include "Characters/SNGCharacterBase_DEPRECATED.h" +#include "GameFramework/DamageType.h" #include "Kismet/KismetSystemLibrary.h" #include "SwordNGun/SwordNGun.h" diff --git a/SwordNGun/Source/SwordNGun/Public/Components/SNGStateMachineComponent.h b/SwordNGun/Source/SwordNGun/Public/Components/SNGStateMachineComponent.h index 826a415..f1e7d46 100644 --- a/SwordNGun/Source/SwordNGun/Public/Components/SNGStateMachineComponent.h +++ b/SwordNGun/Source/SwordNGun/Public/Components/SNGStateMachineComponent.h @@ -3,7 +3,7 @@ #pragma once #include "CoreMinimal.h" -#include "States/SNGState.h" +#include "States/OLD/SNGState.h" #include "Components/ActorComponent.h" #include "Interfaces/SNGEventProcessorInterface.h" diff --git a/SwordNGun/Source/SwordNGun/Public/States/SNGEnemyBaseState.h b/SwordNGun/Source/SwordNGun/Public/States/OLD/SNGEnemyBaseState.h similarity index 87% rename from SwordNGun/Source/SwordNGun/Public/States/SNGEnemyBaseState.h rename to SwordNGun/Source/SwordNGun/Public/States/OLD/SNGEnemyBaseState.h index 4353091..1489642 100644 --- a/SwordNGun/Source/SwordNGun/Public/States/SNGEnemyBaseState.h +++ b/SwordNGun/Source/SwordNGun/Public/States/OLD/SNGEnemyBaseState.h @@ -1,25 +1,25 @@ -// Project Sword & Gun Copyright © 2021 Kevin Poretti - -#pragma once - -#include "CoreMinimal.h" - -#include "Characters/SNGEnemyBase.h" -#include "States/SNGState.h" -#include "SNGEnemyBaseState.generated.h" - -/** - * - */ -UCLASS() -class SWORDNGUN_API USNGEnemyBaseState : public USNGState -{ - GENERATED_BODY() - -public: - virtual void SetOwner(AActor* StateOwner) override; - -protected: - UPROPERTY(BlueprintReadOnly) - ASNGEnemyBase* Enemy; -}; +// Project Sword & Gun Copyright © 2021 Kevin Poretti + +#pragma once + +#include "CoreMinimal.h" + +#include "Characters/SNGEnemyBase.h" +#include "States/OLD/SNGState.h" +#include "SNGEnemyBaseState.generated.h" + +/** + * + */ +UCLASS() +class SWORDNGUN_API USNGEnemyBaseState : public USNGState +{ + GENERATED_BODY() + +public: + virtual void SetOwner(AActor* StateOwner) override; + +protected: + UPROPERTY(BlueprintReadOnly) + ASNGEnemyBase* Enemy; +}; diff --git a/SwordNGun/Source/SwordNGun/Public/States/SNGProtagonistState.h b/SwordNGun/Source/SwordNGun/Public/States/OLD/SNGProtagonistState.h similarity index 87% rename from SwordNGun/Source/SwordNGun/Public/States/SNGProtagonistState.h rename to SwordNGun/Source/SwordNGun/Public/States/OLD/SNGProtagonistState.h index 75863eb..8dc2f7e 100644 --- a/SwordNGun/Source/SwordNGun/Public/States/SNGProtagonistState.h +++ b/SwordNGun/Source/SwordNGun/Public/States/OLD/SNGProtagonistState.h @@ -1,25 +1,25 @@ -// Project Sword & Gun Copyright © 2021 Kevin Poretti - -#pragma once - -#include "CoreMinimal.h" - -#include "Characters/SNGProtagonist.h" -#include "States/SNGState.h" -#include "SNGProtagonistState.generated.h" - -/** - * - */ -UCLASS() -class SWORDNGUN_API USNGProtagonistState : public USNGState -{ - GENERATED_BODY() - -public: - virtual void SetOwner(AActor* StateOwner) override; - -protected: - UPROPERTY(BlueprintReadOnly) - ASNGProtagonist* Protagonist; -}; +// Project Sword & Gun Copyright © 2021 Kevin Poretti + +#pragma once + +#include "CoreMinimal.h" + +#include "Characters/SNGProtagonist.h" +#include "States/OLD/SNGState.h" +#include "SNGProtagonistState.generated.h" + +/** + * + */ +UCLASS() +class SWORDNGUN_API USNGProtagonistState : public USNGState +{ + GENERATED_BODY() + +public: + virtual void SetOwner(AActor* StateOwner) override; + +protected: + UPROPERTY(BlueprintReadOnly) + ASNGProtagonist* Protagonist; +}; diff --git a/SwordNGun/Source/SwordNGun/Public/States/SNGState.h b/SwordNGun/Source/SwordNGun/Public/States/OLD/SNGState.h similarity index 95% rename from SwordNGun/Source/SwordNGun/Public/States/SNGState.h rename to SwordNGun/Source/SwordNGun/Public/States/OLD/SNGState.h index cea9e75..875df8e 100644 --- a/SwordNGun/Source/SwordNGun/Public/States/SNGState.h +++ b/SwordNGun/Source/SwordNGun/Public/States/OLD/SNGState.h @@ -1,110 +1,110 @@ -// Project Sword & Gun Copyright © 2021 Kevin Poretti - -#pragma once - -#include "CoreMinimal.h" - -#include "SwordNGun/SNGTypes.h" - - -#include "SNGState.generated.h" - -DECLARE_DYNAMIC_DELEGATE_RetVal(bool, FStateTransitionRule); - -DECLARE_DYNAMIC_DELEGATE_RetVal_OneParam(FName, FEventHandlerRule, FSNGEvent&, Event); - -/** - * - */ -UCLASS(Blueprintable) -class SWORDNGUN_API USNGState : public UObject -{ - GENERATED_BODY() - - public: - USNGState(); - - UFUNCTION(BlueprintCallable) - void RegisterTransition(FName DestState, FName TransitionRuleFunctionName); - - UFUNCTION(BlueprintCallable) - void RegisterEventHandler(ESNGEventType EventType, FName EventHandlerFunctionName); - - FName GetName(); - - float GetTimeInState(); - - bool CanTransitionToItself(); - - UFUNCTION(BlueprintCallable) - AActor* GetOwner(); - - virtual void SetOwner(AActor* StateOwner); - - USNGState* GetParent(); - - void SetParent(USNGState* ParentState); - - uint32 GetDepth(); - - TArray> GetSubStateClasses(); - - void AddSubState(USNGState* SubState); - - // returns name of the next state if event triggers a state transition - FName GetNextStateFromEvent(FSNGEvent& Event); - - // executes transitions rules for this state to determine what substate - FName GetNextState(); - - void CreateState(); - - USNGState* EnterState(FSNGEvent& Event); - - void ExitState(); - - void UpdateState(float DeltaTime); - - protected: - - UPROPERTY(EditDefaultsOnly) - FName Name; - - UPROPERTY(BlueprintReadOnly) - float TimeInState; - - UPROPERTY(EditDefaultsOnly) - bool bCanTransitionToItself; - - UPROPERTY(EditDefaultsOnly, Category="Sub states", meta = (ClampMin = -1)) - int32 DefaultSubStateIndex; - - UPROPERTY(EditDefaultsOnly, Category="Sub states") - TArray> SubStateClasses; - - TArray SubStates; - - AActor* Owner; - - USNGState* Parent; - - // distance from root node - uint32 Depth; - - // NOTE(kevin): I don't think this needs to be a map - TMap Transitions; - - TMap> Handlers; - - UFUNCTION(BlueprintImplementableEvent) - void OnCreateState(); - - UFUNCTION(BlueprintImplementableEvent) - void OnEnterState(FSNGEvent Event); - - UFUNCTION(BlueprintImplementableEvent) - void OnExitState(); - - UFUNCTION(BlueprintImplementableEvent) - void OnUpdateState(float DeltaTime); -}; +// Project Sword & Gun Copyright © 2021 Kevin Poretti + +#pragma once + +#include "CoreMinimal.h" + +#include "SwordNGun/SNGTypes.h" + + +#include "SNGState.generated.h" + +DECLARE_DYNAMIC_DELEGATE_RetVal(bool, FStateTransitionRule); + +DECLARE_DYNAMIC_DELEGATE_RetVal_OneParam(FName, FEventHandlerRule, FSNGEvent&, Event); + +/** + * + */ +UCLASS(Blueprintable) +class SWORDNGUN_API USNGState : public UObject +{ + GENERATED_BODY() + + public: + USNGState(); + + UFUNCTION(BlueprintCallable) + void RegisterTransition(FName DestState, FName TransitionRuleFunctionName); + + UFUNCTION(BlueprintCallable) + void RegisterEventHandler(ESNGEventType EventType, FName EventHandlerFunctionName); + + FName GetName(); + + float GetTimeInState(); + + bool CanTransitionToItself(); + + UFUNCTION(BlueprintCallable) + AActor* GetOwner(); + + virtual void SetOwner(AActor* StateOwner); + + USNGState* GetParent(); + + void SetParent(USNGState* ParentState); + + uint32 GetDepth(); + + TArray> GetSubStateClasses(); + + void AddSubState(USNGState* SubState); + + // returns name of the next state if event triggers a state transition + FName GetNextStateFromEvent(FSNGEvent& Event); + + // executes transitions rules for this state to determine what substate + FName GetNextState(); + + void CreateState(); + + USNGState* EnterState(FSNGEvent& Event); + + void ExitState(); + + void UpdateState(float DeltaTime); + + protected: + + UPROPERTY(EditDefaultsOnly) + FName Name; + + UPROPERTY(BlueprintReadOnly) + float TimeInState; + + UPROPERTY(EditDefaultsOnly) + bool bCanTransitionToItself; + + UPROPERTY(EditDefaultsOnly, Category="Sub states", meta = (ClampMin = -1)) + int32 DefaultSubStateIndex; + + UPROPERTY(EditDefaultsOnly, Category="Sub states") + TArray> SubStateClasses; + + TArray SubStates; + + AActor* Owner; + + USNGState* Parent; + + // distance from root node + uint32 Depth; + + // NOTE(kevin): I don't think this needs to be a map + TMap Transitions; + + TMap> Handlers; + + UFUNCTION(BlueprintImplementableEvent) + void OnCreateState(); + + UFUNCTION(BlueprintImplementableEvent) + void OnEnterState(FSNGEvent Event); + + UFUNCTION(BlueprintImplementableEvent) + void OnExitState(); + + UFUNCTION(BlueprintImplementableEvent) + void OnUpdateState(float DeltaTime); +}; diff --git a/SwordNGun/Source/SwordNGun/Public/States/SNGStateMachine.h b/SwordNGun/Source/SwordNGun/Public/States/SNGStateMachine.h new file mode 100644 index 0000000..19a08a1 Binary files /dev/null and b/SwordNGun/Source/SwordNGun/Public/States/SNGStateMachine.h differ diff --git a/SwordNGun/Source/SwordNGun/Public/States/SNGStateMachineFactory.h b/SwordNGun/Source/SwordNGun/Public/States/SNGStateMachineFactory.h new file mode 100644 index 0000000..8e1cebe Binary files /dev/null and b/SwordNGun/Source/SwordNGun/Public/States/SNGStateMachineFactory.h differ diff --git a/SwordNGun/Source/SwordNGun/Public/States/SNGStateMachineTypeActions.h b/SwordNGun/Source/SwordNGun/Public/States/SNGStateMachineTypeActions.h new file mode 100644 index 0000000..0b5250c Binary files /dev/null and b/SwordNGun/Source/SwordNGun/Public/States/SNGStateMachineTypeActions.h differ diff --git a/SwordNGun/Source/SwordNGun/SwordNGun.Build.cs b/SwordNGun/Source/SwordNGun/SwordNGun.Build.cs index 1632fc9..49e6fd9 100644 --- a/SwordNGun/Source/SwordNGun/SwordNGun.Build.cs +++ b/SwordNGun/Source/SwordNGun/SwordNGun.Build.cs @@ -8,7 +8,7 @@ public class SwordNGun : ModuleRules { PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs; - PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "PhysicsCore" }); + PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "PhysicsCore", "UnrealEd", "AssetTools" }); PrivateDependencyModuleNames.AddRange(new string[] { }); diff --git a/SwordNGun/SwordNGun.uproject b/SwordNGun/SwordNGun.uproject index 73ec385..d5f4967 100644 --- a/SwordNGun/SwordNGun.uproject +++ b/SwordNGun/SwordNGun.uproject @@ -10,7 +10,8 @@ "LoadingPhase": "Default", "AdditionalDependencies": [ "Engine", - "CoreUObject" + "CoreUObject", + "UnrealEd" ] } ],