summaryrefslogtreecommitdiff
path: root/Assets/Scripts/Test
diff options
context:
space:
mode:
Diffstat (limited to 'Assets/Scripts/Test')
-rw-r--r--Assets/Scripts/Test/AimTest.cs16
-rw-r--r--Assets/Scripts/Test/AimTest.cs.meta11
-rw-r--r--Assets/Scripts/Test/ArmorSoldierScript.cs57
-rw-r--r--Assets/Scripts/Test/ArmorSoldierScript.cs.meta11
-rw-r--r--Assets/Scripts/Test/ArmorSoldierScript_Anim.cs35
-rw-r--r--Assets/Scripts/Test/ArmorSoldierScript_Anim.cs.meta11
-rw-r--r--Assets/Scripts/Test/ArmorSoldierScript_States.cs64
-rw-r--r--Assets/Scripts/Test/ArmorSoldierScript_States.cs.meta11
-rw-r--r--Assets/Scripts/Test/CentreTest.cs22
-rw-r--r--Assets/Scripts/Test/CentreTest.cs.meta11
-rw-r--r--Assets/Scripts/Test/FootIKTest.cs69
-rw-r--r--Assets/Scripts/Test/FootIKTest.cs.meta11
-rw-r--r--Assets/Scripts/Test/HitBoxTest.cs36
-rw-r--r--Assets/Scripts/Test/HitBoxTest.cs.meta11
-rw-r--r--Assets/Scripts/Test/IKTest.cs33
-rw-r--r--Assets/Scripts/Test/IKTest.cs.meta11
-rw-r--r--Assets/Scripts/Test/PhysicsWorldTest.cs20
-rw-r--r--Assets/Scripts/Test/PhysicsWorldTest.cs.meta11
-rw-r--r--Assets/Scripts/Test/RootConstainTest.cs41
-rw-r--r--Assets/Scripts/Test/RootConstainTest.cs.meta11
-rw-r--r--Assets/Scripts/Test/SaionjiCloneScript.cs20
-rw-r--r--Assets/Scripts/Test/SaionjiCloneScript.cs.meta11
-rw-r--r--Assets/Scripts/Test/SaionjiScript.cs107
-rw-r--r--Assets/Scripts/Test/SaionjiScript.cs.meta11
-rw-r--r--Assets/Scripts/Test/SaionjiScript_Anim.cs69
-rw-r--r--Assets/Scripts/Test/SaionjiScript_Anim.cs.meta11
-rw-r--r--Assets/Scripts/Test/SaionjiScript_Effect.cs11
-rw-r--r--Assets/Scripts/Test/SaionjiScript_Effect.cs.meta11
-rw-r--r--Assets/Scripts/Test/SaionjiScript_Physics.cs8
-rw-r--r--Assets/Scripts/Test/SaionjiScript_Physics.cs.meta11
-rw-r--r--Assets/Scripts/Test/SaionjiScript_States.cs391
-rw-r--r--Assets/Scripts/Test/SaionjiScript_States.cs.meta11
-rw-r--r--Assets/Scripts/Test/SaionjiUberAbility.cs24
-rw-r--r--Assets/Scripts/Test/SaionjiUberAbility.cs.meta11
34 files changed, 0 insertions, 1210 deletions
diff --git a/Assets/Scripts/Test/AimTest.cs b/Assets/Scripts/Test/AimTest.cs
deleted file mode 100644
index d69c4a41..00000000
--- a/Assets/Scripts/Test/AimTest.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-
-public class AimTest : MonoBehaviour
-{
- public GameObject Go_ConstainObj;
-
- public GameObject Go_AimTarget;
-
- public void LateUpdate()
- {
- Go_ConstainObj.transform.LookAt(Go_AimTarget.transform);
- }
-
-}
diff --git a/Assets/Scripts/Test/AimTest.cs.meta b/Assets/Scripts/Test/AimTest.cs.meta
deleted file mode 100644
index 8ce108cb..00000000
--- a/Assets/Scripts/Test/AimTest.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 14b31a10863e5634bb77b3ab2ad9941b
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Scripts/Test/ArmorSoldierScript.cs b/Assets/Scripts/Test/ArmorSoldierScript.cs
deleted file mode 100644
index c86ca009..00000000
--- a/Assets/Scripts/Test/ArmorSoldierScript.cs
+++ /dev/null
@@ -1,57 +0,0 @@
-using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-
-public partial class ArmorSoldierScript : Avatar, IInteractable
-{
- public Animator m_Animator;
-
- void Awake()
- {
- m_Animator = GetComponent<Animator>();
- }
-
- private void Start()
- {
- base.Init();
-
- SetupAnim();
- SetupStates();
- }
-
- private void OnAnimatorMove()
- {
- Animator animator = GetComponent<Animator>();
-
- AnimatorStateInfo stateInfo = animator.GetCurrentAnimatorStateInfo(0);
-
- // animator.deltaPosition和animator.deltaRotation是animator做的root motion后的结果
- // 在后面做一个硬性约束z=0,将角色限制在z=0平面上
- if (stateInfo.IsTag("IgnoreRootMotion"))
- {
- // ignore root motion
- //Debug.Log("ignore root motion ");
- }
- else
- {
- Vector3 position = transform.position;
- position.x += animator.deltaPosition.x;
- position.y += animator.deltaPosition.y;
- transform.position = position;
-
- // animation clip导入设置旋转一般上设置为baked inpose,不需要手动限制
- transform.rotation *= animator.deltaRotation;
- }
- }
-
- public void Hurt()
- {
- }
-
- public override void OnHurt(HurtInfo hurtInfo)
- {
- base.OnHurt(hurtInfo);
- Hurt();
- }
-
-}
diff --git a/Assets/Scripts/Test/ArmorSoldierScript.cs.meta b/Assets/Scripts/Test/ArmorSoldierScript.cs.meta
deleted file mode 100644
index eeb0f056..00000000
--- a/Assets/Scripts/Test/ArmorSoldierScript.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 6c58b0c0555555e4c9fbd344b5162103
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Scripts/Test/ArmorSoldierScript_Anim.cs b/Assets/Scripts/Test/ArmorSoldierScript_Anim.cs
deleted file mode 100644
index fd632ab7..00000000
--- a/Assets/Scripts/Test/ArmorSoldierScript_Anim.cs
+++ /dev/null
@@ -1,35 +0,0 @@
-using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-
-public partial class ArmorSoldierScript : Avatar, IInteractable
-{
- int Anim_Idle;
-
- int Anim_HurtFront;
-
- int Anim_LightHurt;
- int Anim_MidiumHurt;
- int Anim_HeavyHurt;
- int Anim_GroundHurt;
- int Anim_AirHurt;
-
- int Anim_GetUp;
-
-
- void SetupAnim()
- {
- Anim_Idle = Animator.StringToHash("Idle");
-
- Anim_HurtFront = Animator.StringToHash("Hurt_Front");
- Anim_LightHurt = Animator.StringToHash("Hurt_Light");
- Anim_MidiumHurt = Animator.StringToHash("Hurt_Midium");
- Anim_HeavyHurt = Animator.StringToHash("Hurt_Heavy");
- Anim_GroundHurt = Animator.StringToHash("Hurt_Ground");
- Anim_AirHurt = Animator.StringToHash("Hurt_Air");
-
- Anim_GetUp = Animator.StringToHash("GetUp");
-
- }
-
-} \ No newline at end of file
diff --git a/Assets/Scripts/Test/ArmorSoldierScript_Anim.cs.meta b/Assets/Scripts/Test/ArmorSoldierScript_Anim.cs.meta
deleted file mode 100644
index 212feda4..00000000
--- a/Assets/Scripts/Test/ArmorSoldierScript_Anim.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 5ff0f58fdd1c9834e858aa0dda2b0ff8
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Scripts/Test/ArmorSoldierScript_States.cs b/Assets/Scripts/Test/ArmorSoldierScript_States.cs
deleted file mode 100644
index 3df583f2..00000000
--- a/Assets/Scripts/Test/ArmorSoldierScript_States.cs
+++ /dev/null
@@ -1,64 +0,0 @@
-using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-
-public partial class ArmorSoldierScript : Avatar, IInteractable
-{
-
- void SetupStates()
- {
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- // states
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- IdleState idle = new IdleState(m_Animator, Anim_Idle);
-
- HurtState lightHurt = new HurtState(m_Animator, Anim_LightHurt);
- HurtState midiumHurt = new HurtState(m_Animator, Anim_MidiumHurt);
- HurtState heavyHurt = new HurtState(m_Animator, Anim_HeavyHurt);
- HurtState groundHurt = new HurtState(m_Animator, Anim_GroundHurt);
- HurtState airHurt = new HurtState(m_Animator, Anim_AirHurt);
- m_StateLightHurt = lightHurt;
- m_StateMidiumHurt = midiumHurt;
- m_StateHeavyHurt = heavyHurt;
- m_StateGroundHurt = groundHurt;
- m_StateAirHurt = airHurt;
-
- HurtState getUp = new HurtState(m_Animator, Anim_GetUp);
-
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- // conditions
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- ConditionInAir condInAir = new ConditionInAir(m_BodyCollider);
-
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- // actions
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- ActionSwitchState switchToIdle = new ActionSwitchState(m_StateController, idle);
- ActionSwitchState switchToGetUp = new ActionSwitchState(m_StateController, getUp);
-
- Trigger trigger = null;
-
-
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- // state setup
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
- // light hurt
- ConditionMotionAtEnd lightHurtAtEnd = new ConditionMotionAtEnd(m_Animator, Anim_LightHurt);
- trigger = new Trigger(lightHurtAtEnd, switchToIdle);
- lightHurt.AddTrigger(trigger);
-
- // air hurt
- ConditionMotionAtEnd airAtEnd = new ConditionMotionAtEnd(m_Animator, Anim_AirHurt);
- trigger = new Trigger(And(airAtEnd, Not(condInAir)), switchToGetUp);
- airHurt.AddTrigger(trigger);
-
- // getup
- ConditionMotionAtEnd getUpEnd = new ConditionMotionAtEnd(m_Animator, Anim_GetUp);
- trigger = new Trigger(getUpEnd, switchToIdle);
- getUp.AddTrigger(trigger);
-
- m_StateController.ForceStart(idle);
- }
-
-} \ No newline at end of file
diff --git a/Assets/Scripts/Test/ArmorSoldierScript_States.cs.meta b/Assets/Scripts/Test/ArmorSoldierScript_States.cs.meta
deleted file mode 100644
index 02336b68..00000000
--- a/Assets/Scripts/Test/ArmorSoldierScript_States.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: f146c570f99fe2e4aad5f1312524413c
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Scripts/Test/CentreTest.cs b/Assets/Scripts/Test/CentreTest.cs
deleted file mode 100644
index b921cc59..00000000
--- a/Assets/Scripts/Test/CentreTest.cs
+++ /dev/null
@@ -1,22 +0,0 @@
-using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-
-public class CentreTest : MonoBehaviour
-{
-
- public Transform Trans_Saionji_Left;
- public Transform Trans_Saionji_Right;
-
- // Start is called before the first frame update
- void Start()
- {
-
- }
-
- // Update is called once per frame
- void Update()
- {
- transform.position = (Trans_Saionji_Left.position + Trans_Saionji_Right.position ) / 2;
- }
-}
diff --git a/Assets/Scripts/Test/CentreTest.cs.meta b/Assets/Scripts/Test/CentreTest.cs.meta
deleted file mode 100644
index 26344c97..00000000
--- a/Assets/Scripts/Test/CentreTest.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: eaed63c01c9585646a42db13922e420a
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Scripts/Test/FootIKTest.cs b/Assets/Scripts/Test/FootIKTest.cs
deleted file mode 100644
index 5b939619..00000000
--- a/Assets/Scripts/Test/FootIKTest.cs
+++ /dev/null
@@ -1,69 +0,0 @@
-using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-
-public class FootIKTest : MonoBehaviour
-{
-
- Animator anim;
-
- public LayerMask layerMask;
-
- [Range(0, 1f)]
- public float DistanceToGround;
-
- private void Start()
- {
-
- anim = GetComponent<Animator>();
-
- }
-
- private void OnAnimatorIK(int layerIndex)
- {
-
- if (anim)
- {
-
- anim.SetIKPositionWeight(AvatarIKGoal.LeftFoot, anim.GetFloat("IKLeftFootWeight"));
- anim.SetIKRotationWeight(AvatarIKGoal.LeftFoot, anim.GetFloat("IKLeftFootWeight"));
- anim.SetIKPositionWeight(AvatarIKGoal.RightFoot, anim.GetFloat("IKRightFootWeight"));
- anim.SetIKRotationWeight(AvatarIKGoal.RightFoot, anim.GetFloat("IKRightFootWeight"));
-
- // Left Foot
- RaycastHit hit;
- Ray ray = new Ray(anim.GetIKPosition(AvatarIKGoal.LeftFoot) + Vector3.up, Vector3.down);
- if (Physics.Raycast(ray, out hit, DistanceToGround + 1f, layerMask))
- {
- if (hit.transform.tag == "Walkable")
- {
- Vector3 footOriginForward = anim.GetBoneTransform(HumanBodyBones.LeftFoot).forward;
- Vector3 footPosition = hit.point;
- footPosition.y += DistanceToGround;
- anim.SetIKPosition(AvatarIKGoal.LeftFoot, footPosition);
- anim.SetIKRotation(AvatarIKGoal.LeftFoot, Quaternion.LookRotation(footOriginForward - Vector3.Dot(footOriginForward, hit.normal) *(hit.normal), hit.normal));
- }
- }
-
- // Right Foot
- ray = new Ray(anim.GetIKPosition(AvatarIKGoal.RightFoot) + Vector3.up, Vector3.down);
- if (Physics.Raycast(ray, out hit, DistanceToGround + 1f, layerMask))
- {
-
- if (hit.transform.tag == "Walkable")
- {
- Vector3 footOriginForward = anim.GetBoneTransform(HumanBodyBones.RightFoot).forward;
- Vector3 footPosition = hit.point;
- footPosition.y += DistanceToGround;
- anim.SetIKPosition(AvatarIKGoal.RightFoot, footPosition);
- anim.SetIKRotation(AvatarIKGoal.RightFoot, Quaternion.LookRotation(footOriginForward - Vector3.Dot(footOriginForward, hit.normal) * (hit.normal), hit.normal));
- }
-
- }
-
-
- }
-
- }
-
-} \ No newline at end of file
diff --git a/Assets/Scripts/Test/FootIKTest.cs.meta b/Assets/Scripts/Test/FootIKTest.cs.meta
deleted file mode 100644
index 7810f3e2..00000000
--- a/Assets/Scripts/Test/FootIKTest.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 085a845c7a7e3fe48baa79d4cda91183
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Scripts/Test/HitBoxTest.cs b/Assets/Scripts/Test/HitBoxTest.cs
deleted file mode 100644
index 139ec287..00000000
--- a/Assets/Scripts/Test/HitBoxTest.cs
+++ /dev/null
@@ -1,36 +0,0 @@
-using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-
-// AABB hitbox
-public class HitBoxTest : MonoBehaviour
-{
- public bool DrawGizmo;
-
- [SerializeField]
- private bool m_IsActive;
-
- [SerializeField]
- private Vector3 m_TopLeft, m_RightBottom;
-
- private void OnDrawGizmos()
- {
- if (!DrawGizmo) return;
- Gizmos.color = Color.green;
- Vector3 topleft = transform.position + m_TopLeft;
- Vector3 rightbottom = transform.position + m_RightBottom;
- Gizmos.DrawCube((topleft + rightbottom) / 2, rightbottom - topleft);
- }
-
- // Start is called before the first frame update
- void Start()
- {
-
- }
-
- // Update is called once per frame
- void Update()
- {
-
- }
-}
diff --git a/Assets/Scripts/Test/HitBoxTest.cs.meta b/Assets/Scripts/Test/HitBoxTest.cs.meta
deleted file mode 100644
index 2d7fb88b..00000000
--- a/Assets/Scripts/Test/HitBoxTest.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 78c38f462ec6a5b43a2e1e8194924c93
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Scripts/Test/IKTest.cs b/Assets/Scripts/Test/IKTest.cs
deleted file mode 100644
index fdc5c2a3..00000000
--- a/Assets/Scripts/Test/IKTest.cs
+++ /dev/null
@@ -1,33 +0,0 @@
-using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-
-public class IKTest : MonoBehaviour
-{
- public GameObject Go_FootIK;
- [Range(0,1)]
- public float IKWeight;
-
- private Animator animator;
-
- private void Start()
- {
-
- }
-
- private void OnAnimatorIK(int layerIndex)
- {
- if(animator == null)
- {
- animator = GetComponent<Animator>();
- }
-
- animator.SetIKPositionWeight(AvatarIKGoal.LeftFoot, IKWeight);
- animator.SetIKPosition(AvatarIKGoal.LeftFoot, Go_FootIK.transform.position);
-
- animator.SetIKRotationWeight(AvatarIKGoal.LeftFoot, IKWeight);
- animator.SetIKRotation(AvatarIKGoal.LeftFoot, Go_FootIK.transform.rotation);
-
- }
-
-}
diff --git a/Assets/Scripts/Test/IKTest.cs.meta b/Assets/Scripts/Test/IKTest.cs.meta
deleted file mode 100644
index f0cee3c6..00000000
--- a/Assets/Scripts/Test/IKTest.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 7d08e197d3e6d2340a4866f2bf7a8447
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Scripts/Test/PhysicsWorldTest.cs b/Assets/Scripts/Test/PhysicsWorldTest.cs
deleted file mode 100644
index d1c240a5..00000000
--- a/Assets/Scripts/Test/PhysicsWorldTest.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-
-public class PhysicsWorldTest : MonoBehaviour
-{
-
-
- // Start is called before the first frame update
- void Start()
- {
-
- }
-
- // Update is called once per frame
- void Update()
- {
-
- }
-}
diff --git a/Assets/Scripts/Test/PhysicsWorldTest.cs.meta b/Assets/Scripts/Test/PhysicsWorldTest.cs.meta
deleted file mode 100644
index 6e113c78..00000000
--- a/Assets/Scripts/Test/PhysicsWorldTest.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: bef3db5279f15c347a57f806171eaa33
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Scripts/Test/RootConstainTest.cs b/Assets/Scripts/Test/RootConstainTest.cs
deleted file mode 100644
index 7936fd25..00000000
--- a/Assets/Scripts/Test/RootConstainTest.cs
+++ /dev/null
@@ -1,41 +0,0 @@
-using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-
-public class RootConstainTest : MonoBehaviour
-{
- // Start is called before the first frame update
- void Start()
- {
-
- }
-
- // Update is called once per frame
- void Update()
- {
-
- }
-
- private void OnAnimatorMove()
- {
- Animator animator = GetComponent<Animator>();
-
- // 约束z=0
- if (animator)
- {
- Vector3 position = transform.position;
- position.x += animator.deltaPosition.x;
- position.y += animator.deltaPosition.y;
-
- transform.position = position;
-
- transform.rotation *= animator.deltaRotation;
-
- //transform.forward = animator.deltaRotation * transform.forward;
- //Vector3 euler = animator.deltaRotation.ToEuler();
- //euler.x = euler.z = euler.y = 0;
- //transform.rotation *= Quaternion.Euler(euler);
- }
- }
-
-}
diff --git a/Assets/Scripts/Test/RootConstainTest.cs.meta b/Assets/Scripts/Test/RootConstainTest.cs.meta
deleted file mode 100644
index c21abeab..00000000
--- a/Assets/Scripts/Test/RootConstainTest.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: c5984537089789644b0e8e326ae83aad
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Scripts/Test/SaionjiCloneScript.cs b/Assets/Scripts/Test/SaionjiCloneScript.cs
deleted file mode 100644
index d6ddba86..00000000
--- a/Assets/Scripts/Test/SaionjiCloneScript.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-
-public class SaionjiCloneScript : MonoBehaviour
-{
- public Animator m_Animator;
-
- public void OnEnable()
- {
- int Anim_Idle;
- Anim_Idle = Animator.StringToHash("Idle_Fight2");
- m_Animator.CrossFade(Anim_Idle, 0);
- }
-
- public void Update()
- {
- }
-
-}
diff --git a/Assets/Scripts/Test/SaionjiCloneScript.cs.meta b/Assets/Scripts/Test/SaionjiCloneScript.cs.meta
deleted file mode 100644
index 64a58ee0..00000000
--- a/Assets/Scripts/Test/SaionjiCloneScript.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 92d46c9d136abdc46bb8fc83c650891f
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Scripts/Test/SaionjiScript.cs b/Assets/Scripts/Test/SaionjiScript.cs
deleted file mode 100644
index 1178b42a..00000000
--- a/Assets/Scripts/Test/SaionjiScript.cs
+++ /dev/null
@@ -1,107 +0,0 @@
-using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-
-public partial class SaionjiScript : Avatar
-{
- public enum Weapon
- {
- Pistol,
- Blade,
- Reaper,
- LongSword,
- }
-
- HitBoxTest hitbox;
- Animator animator;
-
- public GameObject Go_PistolL;
- public GameObject Go_PistolR;
- public GameObject Go_Blade;
- public GameObject Go_Reaper;
- public GameObject Go_LongSword;
-
- [SerializeField]
- private Weapon m_Weapon;
-
- public bool EnableStateController;
-
- public EffectHandler[] Effects;
-
- void Start()
- {
- base.Init();
-
- animator = GetComponent<Animator>();
- //animator.speed = 0;
- PhysicsWorld.Instance.AddAnimator(animator);
-
- Go_PistolL.SetActive(m_Weapon == Weapon.Pistol);
- Go_PistolR.SetActive(m_Weapon == Weapon.Pistol);
- Go_Blade.SetActive(m_Weapon == Weapon.Blade);
- Go_Reaper.SetActive(m_Weapon == Weapon.Reaper);
- Go_LongSword.SetActive(m_Weapon == Weapon.LongSword);
-
- GetAnimHash();
-
- if (EnableStateController)
- SetupStates();
- }
-
- //private void Update()
- //{
- // //if (EnableStateController)
- // // m_StateController.OnUpdate();
- //}
-
- // 更新顺序:
- // internal animator update -> OnAnimatorMove() -> physics
- // 角色最后的位置以物理系统为准(如果加入物理系统的话)
- // 如果后续有物理处理,会重写transform
- // 对于后续不受物理管理的动作,不需要修改transform
- void OnAnimatorMove()
- {
- Animator animator = GetComponent<Animator>();
- if (animator == null)
- return;
-
- AnimatorStateInfo stateInfo = animator.GetCurrentAnimatorStateInfo(0);
-
- if(stateInfo.IsTag("IgnoreRootMotion"))
- {
- // ignore root motion
- //Debug.Log("ignore root motion ");
- }
- else if(stateInfo.IsTag("IgnoreRootMotionY"))
- {
- Vector3 position = transform.position;
- position.x += animator.deltaPosition.x;
- transform.position = position;
-
- transform.rotation *= animator.deltaRotation;
- }
- else
- {
- // animator.deltaPosition和animator.deltaRotation是animator做的root motion后的结果
- // 在后面做一个硬性约束z=0,将角色限制在z=0平面上
- Vector3 position = transform.position;
- position.x += animator.deltaPosition.x;
- position.y += animator.deltaPosition.y;
- transform.position = position;
-
- // animation clip导入设置旋转一般上设置为baked inpose,不需要手动限制
- transform.rotation *= animator.deltaRotation;
- }
- }
-
- public override void OnHit(HitInfo hitInfo)
- {
- base.OnHit(hitInfo);
- }
-
- public override void OnHurt(HurtInfo hurtInfo)
- {
- base.OnHurt(hurtInfo);
- }
-
-}
diff --git a/Assets/Scripts/Test/SaionjiScript.cs.meta b/Assets/Scripts/Test/SaionjiScript.cs.meta
deleted file mode 100644
index e2123888..00000000
--- a/Assets/Scripts/Test/SaionjiScript.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: c2788004f7d291b40a1ac1c11c3bdc3d
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Scripts/Test/SaionjiScript_Anim.cs b/Assets/Scripts/Test/SaionjiScript_Anim.cs
deleted file mode 100644
index f5543823..00000000
--- a/Assets/Scripts/Test/SaionjiScript_Anim.cs
+++ /dev/null
@@ -1,69 +0,0 @@
-using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-
-public partial class SaionjiScript : Avatar
-{
- int Anim_Idle;
- int Anim_Run;
- int Anim_RunStop;
- int Anim_LightAttack1;
- int Anim_LightAttack2;
- int Anim_LightAttack3;
- int Anim_LightAttack4;
- int Anim_LightAttack5;
- int Anim_LightAttackRush;
- int Anim_SideKick;
- int Anim_SideKickRush;
- int Anim_DashWithSword;
- int Anim_SuperKick;
- int Anim_Gun1;
- int Anim_Gun2;
- int Anim_Gun3;
- int Anim_Gun4;
-
- int Anim_JumpStart;
- int Anim_JumpUp;
- int Anim_JumpDown;
- int Anim_JumpEnd;
-
- int Anim_AirDash;
- int Anim_AirAttack1;
-
- void GetAnimHash()
- {
- //Anim_Idle = Animator.StringToHash("Idle_Gun");
- //Anim_Idle = Animator.StringToHash("Idle_Fight");
- //Anim_Idle = Animator.StringToHash("Idle_Fight2");
- Anim_Idle = Animator.StringToHash("Idle_Relax");
- Anim_Idle = Animator.StringToHash("Idle_Stand");
- Anim_Run = Animator.StringToHash("Run_Sword_Fast");
-
- Anim_LightAttack1 = Animator.StringToHash("Light_Attk_1");
- Anim_LightAttack2 = Animator.StringToHash("Light_Attk_2");
- Anim_LightAttack3 = Animator.StringToHash("Light_Attk_3");
- Anim_LightAttack4 = Animator.StringToHash("Light_Attk_4");
- Anim_LightAttack5 = Animator.StringToHash("Light_Attk_5");
- Anim_LightAttackRush = Animator.StringToHash("Heavy_Attk_Rush_Third");
-
- Anim_SideKick = Animator.StringToHash("SideKick");
- Anim_SideKickRush = Animator.StringToHash("SideKickRush");
- Anim_SuperKick = Animator.StringToHash("SuperKickCombo");
-
- Anim_DashWithSword = Animator.StringToHash("Dash_With_Sword");
-
- Anim_Gun1 = Animator.StringToHash("Gun01");
- Anim_Gun2 = Animator.StringToHash("Gun02");
- Anim_Gun3 = Animator.StringToHash("Gun03");
- Anim_Gun4 = Animator.StringToHash("Gun04");
-
- Anim_JumpStart = Animator.StringToHash("Jump_Start");
- Anim_JumpUp = Animator.StringToHash("Jump_Up");
- Anim_JumpDown = Animator.StringToHash("Jump_Down");
- Anim_JumpEnd = Animator.StringToHash("Jump_End");
-
- Anim_AirDash = Animator.StringToHash("Air_Dash");
- Anim_AirAttack1 = Animator.StringToHash("Air_Attk_1");
- }
-
-}
diff --git a/Assets/Scripts/Test/SaionjiScript_Anim.cs.meta b/Assets/Scripts/Test/SaionjiScript_Anim.cs.meta
deleted file mode 100644
index 4b9e51ec..00000000
--- a/Assets/Scripts/Test/SaionjiScript_Anim.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 8f9ceb597e2e03c45a350f0f607c3d59
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Scripts/Test/SaionjiScript_Effect.cs b/Assets/Scripts/Test/SaionjiScript_Effect.cs
deleted file mode 100644
index 54de744e..00000000
--- a/Assets/Scripts/Test/SaionjiScript_Effect.cs
+++ /dev/null
@@ -1,11 +0,0 @@
-using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-
-public partial class SaionjiScript : Avatar
-{
- public override Vector3 GetEffectPosition()
- {
- return m_Hips.position;
- }
-}
diff --git a/Assets/Scripts/Test/SaionjiScript_Effect.cs.meta b/Assets/Scripts/Test/SaionjiScript_Effect.cs.meta
deleted file mode 100644
index d24fd6f2..00000000
--- a/Assets/Scripts/Test/SaionjiScript_Effect.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 69ccf56f65f14b84a89682dbe0cdb58e
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Scripts/Test/SaionjiScript_Physics.cs b/Assets/Scripts/Test/SaionjiScript_Physics.cs
deleted file mode 100644
index b6fcb393..00000000
--- a/Assets/Scripts/Test/SaionjiScript_Physics.cs
+++ /dev/null
@@ -1,8 +0,0 @@
-using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-
-public partial class SaionjiScript : Avatar
-{
-
-}
diff --git a/Assets/Scripts/Test/SaionjiScript_Physics.cs.meta b/Assets/Scripts/Test/SaionjiScript_Physics.cs.meta
deleted file mode 100644
index 6dec949e..00000000
--- a/Assets/Scripts/Test/SaionjiScript_Physics.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 8efe5825ad2d8454f9bbbeefdd4333f0
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Scripts/Test/SaionjiScript_States.cs b/Assets/Scripts/Test/SaionjiScript_States.cs
deleted file mode 100644
index 0ed8eef2..00000000
--- a/Assets/Scripts/Test/SaionjiScript_States.cs
+++ /dev/null
@@ -1,391 +0,0 @@
-using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-
-public partial class SaionjiScript : Avatar
-{
-
- /// <summary>
- /// 设置states
- /// </summary>
- void SetupStates()
- {
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- // states
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- IdleState idle = new IdleState(animator, Anim_Idle);
-
- MoveState move = new MoveState(animator, Anim_Run);
- MoveState dash = new MoveState(animator, Anim_DashWithSword);
-
- JumpStateConfig jumpConfig = new JumpStateConfig
- {
- animator = animator,
- collider = m_BodyCollider,
- body = m_Body,
- neutralJumpSpeedY = 13f,
- fowardJumpSpeedX = 5f,
- backwardJumpSpeedX = -5f,
- animJump = Anim_JumpStart,
- animJumpEnd = Anim_JumpEnd,
- animNU = Anim_JumpUp,
- animND = Anim_JumpDown,
- animFU = Anim_JumpUp,
- animFD = Anim_JumpDown,
- animBU = Anim_JumpUp,
- animBD = Anim_JumpDown,
- skipStart = true,
- };
- JumpState jump = new JumpState(jumpConfig);
-
- AttackState airDash = new AttackState(animator, Anim_AirDash, m_Body);
-
- AttackStateConfig config;
-
- //招式会绑定一个motion
- HitDefination hitDef = new HitDefination
- {
- type = HitType.Air,
- hurtAddForce = new Vector3(0, 20000, 0),
- sparkName = "Bullet_WhiteSpark",
- sparkHostType = HitSparkHost.Center
- };
- AttackState attk1 = new AttackState(animator, Anim_LightAttack1, m_Body);
- attk1.AddHitDefination(hitDef);
- AttackState attk2 = new AttackState(animator, Anim_LightAttack2, m_Body);
- attk2.AddHitDefination(hitDef);
- AttackState attk3 = new AttackState(animator, Anim_LightAttack3, m_Body);
- attk3.AddHitDefination(hitDef);
- AttackState attk4 = new AttackState(animator, Anim_LightAttack4, m_Body);
- attk4.AddHitDefination(hitDef);
- AttackState attk5 = new AttackState(animator, Anim_LightAttack5, m_Body);
- attk5.AddHitDefination(hitDef);
- AttackState attkRush = new AttackState(animator, Anim_LightAttackRush, m_Body);
-
- config = new AttackStateConfig() {
- animator = this.animator,
- body = this.m_Body,
- motion = Anim_SideKick,
- velocity = new Vector3(20, 1.5f, 0)
- };
- AttackState sideKick = new AttackState(config);
-
- AttackState sideKickRush = new AttackState(animator, Anim_SideKickRush, m_Body);
- AttackState superKick = new AttackState(animator, Anim_SuperKick, m_Body);
- AttackState gun1 = new AttackState(animator, Anim_Gun1, m_Body);
- AttackState gun2 = new AttackState(animator, Anim_Gun2, m_Body);
- AttackState gun3 = new AttackState(animator, Anim_Gun3, m_Body);
- AttackState gun4 = new AttackState(animator, Anim_Gun4, m_Body);
-
- AttackState airAttk1 = new AttackState(animator, Anim_AirAttack1, m_Body);
- hitDef = new HitDefination
- {
- type = HitType.Air,
- hurtAddForce = new Vector3(0,10000,0),
- sparkName = "Bullet_WhiteSpark",
- sparkHostType = HitSparkHost.Center
- };
- airAttk1.AddHitDefination(hitDef);
-
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- // actions
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- ActionTurn180 turn180 = new ActionTurn180(this.transform);
- ActionTowardLeft towardLeft = new ActionTowardLeft(this.transform);
- ActionTowardRight towardRight = new ActionTowardRight(this.transform);
-
- ActionJump toJump = new ActionJump(m_StateController, jump);
- ActionJumpForward toJumpForward = new ActionJumpForward(m_StateController, jump);
-
- ActionSwitchState switchToMove = new ActionSwitchState(m_StateController, move);
- ActionSwitchState switchToIdle = new ActionSwitchState(m_StateController, idle);
- ActionSwitchState switchToAttk1 = new ActionSwitchState(m_StateController, attk1);
- ActionSwitchState switchToAttk2 = new ActionSwitchState(m_StateController, attk2);
- ActionSwitchState switchToAttk3 = new ActionSwitchState(m_StateController, attk3);
- ActionSwitchState switchToAttk4 = new ActionSwitchState(m_StateController, attk4);
- ActionSwitchState switchToAttk5 = new ActionSwitchState(m_StateController, attk5);
- ActionSwitchState switchToAttkRush = new ActionSwitchState(m_StateController, attkRush);
- ActionSwitchState switchToSideKick = new ActionSwitchState(m_StateController, sideKick);
- ActionSwitchState switchToSideKickRush = new ActionSwitchState(m_StateController, sideKickRush);
- ActionSwitchState switchToDash = new ActionSwitchState(m_StateController, dash);
- ActionSwitchState switchToSuperKick = new ActionSwitchState(m_StateController, superKick);
- ActionSwitchState switchToGun1 = new ActionSwitchState(m_StateController, gun1);
- ActionSwitchState switchToGun2 = new ActionSwitchState(m_StateController, gun2);
- ActionSwitchState switchToGun3 = new ActionSwitchState(m_StateController, gun3);
- ActionSwitchState switchToGun4 = new ActionSwitchState(m_StateController, gun4);
-
- ActionSwitchState switchToAirDash = new ActionSwitchState(m_StateController, airDash);
- ActionSwitchState switchToAirAttk1 = new ActionSwitchState(m_StateController, airAttk1);
-
- ActionWipeCmdRecord wipeCmdRecord = new ActionWipeCmdRecord();
-
- ActionEffectGhost enableGhost = new ActionEffectGhost(Effects[0] as CharacterGhostEffect);
- ActionDisableGhost disableGhost = new ActionDisableGhost(Effects[0] as CharacterGhostEffect);
-
- ActionActivateAfterImage enableAfterImage = new ActionActivateAfterImage(true);
- ActionActivateAfterImage disaleAfterImage = new ActionActivateAfterImage(false);
- ActionAfterImageInterval smallAfterImageInterval = new ActionAfterImageInterval(2);
- ActionAfterImageInterval midiumAfterImageInterval = new ActionAfterImageInterval(5);
-
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- // conditions
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- ConditionCommand condLeftCmd = new ConditionCommand(GamepadButton.Left);
- ConditionCommand condRightCmd = new ConditionCommand(GamepadButton.Right);
- ConditionNoMoveButtonHold condNoMoveButtonHold = new ConditionNoMoveButtonHold();
- ConditionButtonHold condRightButtonHold = new ConditionButtonHold(GamepadButton.Right);
- ConditionButtonHold condLeftButtonHold = new ConditionButtonHold(GamepadButton.Left);
- ConditionCommand condUpCmd = new ConditionCommand(GamepadButton.Up);
- ConditionCommand condTriangleCmd = new ConditionCommand(GamepadButton.Triangle);
- ConditionCommand condCircleCmd = new ConditionCommand(GamepadButton.Circle);
- ConditionCommand condCrossCmd = new ConditionCommand(GamepadButton.Cross);
- ConditionCommand condSquareCmd = new ConditionCommand(GamepadButton.Square);
- ConditionTowardLeft condTowardLeft = new ConditionTowardLeft(this.transform);
- ConditionTowardRight condTowardRight = new ConditionTowardRight(this.transform);
- ConditionCommandSeq condRight2Cmd = new ConditionCommandSeq(new List<GamepadButton>{GamepadButton.Right, GamepadButton.Right }, 0.8f);
- ConditionCommandSeq condLeft2Cmd = new ConditionCommandSeq(new List<GamepadButton> { GamepadButton.Left, GamepadButton.Left }, 0.8f);
- ConditionCommandSeq condDRC = new ConditionCommandSeq(new List<GamepadButton> { GamepadButton.Down, GamepadButton.Right, GamepadButton.Circle}, 1f);
- ConditionCommandSeq condDLC = new ConditionCommandSeq(new List<GamepadButton> { GamepadButton.Down, GamepadButton.Left, GamepadButton.Circle }, 1f);
- ConditionCommandSeq condDR = new ConditionCommandSeq(new List<GamepadButton> { GamepadButton.Down, GamepadButton.Right}, 1f);
- ConditionCommandSeq condDL = new ConditionCommandSeq(new List<GamepadButton> { GamepadButton.Down, GamepadButton.Left}, 1f);
-
- ConditionHit condIsHit = new ConditionHit(this);
-
- ConditionJumpDone condJumpDone = new ConditionJumpDone(jump);
- ConditionJumpOnGround condJumpOnGround = new ConditionJumpOnGround(jump);
-
- ConditionInAir condInAir = new ConditionInAir(m_BodyCollider);
-
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- // common triggers
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- Trigger triggerTurnRight = new Trigger(And(condRightCmd, Not(condTowardRight)), towardRight);
- Trigger triggerTurnLeft = new Trigger(And(condLeftCmd, Not(condTowardLeft)), towardLeft);
-
- Trigger trigger = null;
-
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- // state setup
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
- // idle state
- trigger = new Trigger(condTriangleCmd, toJump) ;
- idle.AddTrigger(trigger);
- trigger = new Trigger(And(condTowardRight, condDRC), new List<ActionBase> { wipeCmdRecord, switchToSuperKick });
- idle.AddTrigger(trigger);
- trigger = new Trigger(And(condTowardLeft, condDLC), new List<ActionBase> { wipeCmdRecord, switchToSuperKick });
- idle.AddTrigger(trigger);
- trigger = new Trigger(And(condTowardRight, And(condRightCmd, condRight2Cmd)), new List<ActionBase> { wipeCmdRecord , switchToDash });
- idle.AddTrigger(trigger);
- trigger = new Trigger(And(condTowardLeft, And(condLeftCmd, condLeft2Cmd)), new List<ActionBase> { wipeCmdRecord , switchToDash });
- idle.AddTrigger(trigger);
- trigger = new Trigger(And(condRightButtonHold, Not(condDR)), new List<ActionBase> { switchToMove, towardRight });
- idle.AddTrigger(trigger);
- trigger = new Trigger(And(condLeftButtonHold, Not(condDL)), new List<ActionBase> { switchToMove, towardLeft });
- idle.AddTrigger(trigger);
- trigger = new Trigger(condCircleCmd, switchToAttk1);
- idle.AddTrigger(trigger);
- trigger = new Trigger(condCrossCmd, switchToSideKick);
- idle.AddTrigger(trigger);
- trigger = new Trigger(condSquareCmd, switchToGun1);
- idle.AddTrigger(trigger);
- idle.AddTrigger(triggerTurnRight);
- idle.AddTrigger(triggerTurnLeft);
-
- // move state
- //trigger = new Trigger(Or(Ands(condRightButtonHold, condTowardRight, condTriangleCmd), Ands(condLeftButtonHold, condTowardLeft, condTriangleCmd)), toJumpForward);
- //move.AddTrigger(trigger);
- trigger = new Trigger(condTriangleCmd, toJump);
- move.AddTrigger(trigger);
- trigger = new Trigger(And(condTowardRight, And(condRightCmd, condRight2Cmd)), new List<ActionBase> { wipeCmdRecord, switchToDash, });
- move.AddTrigger(trigger);
- trigger = new Trigger(And(condTowardLeft, And(condLeftCmd, condLeft2Cmd)), new List<ActionBase> { wipeCmdRecord, switchToDash });
- move.AddTrigger(trigger);
- trigger = new Trigger(And(condRightButtonHold, condCircleCmd), new List<ActionBase> { towardRight, switchToAttkRush });
- move.AddTrigger(trigger);
- trigger = new Trigger(And(condLeftButtonHold, condCircleCmd), new List<ActionBase> { towardLeft, switchToAttkRush });
- move.AddTrigger(trigger);
- trigger = new Trigger(And(condRightButtonHold, condCrossCmd), new List<ActionBase> { towardRight, switchToSideKickRush });
- move.AddTrigger(trigger);
- trigger = new Trigger(And(condLeftButtonHold, condCrossCmd), new List<ActionBase> { towardLeft, switchToSideKickRush });
- move.AddTrigger(trigger);
- trigger = new Trigger(And(condTowardRight, Not(condRightButtonHold)), switchToIdle);
- move.AddTrigger(trigger);
- trigger = new Trigger(And(condTowardLeft, Not(condLeftButtonHold)), switchToIdle);
- move.AddTrigger(trigger);
- trigger = new Trigger(condCircleCmd, switchToAttk1);
- move.AddTrigger(trigger);
- trigger = new Trigger(condCrossCmd, switchToSideKick);
- move.AddTrigger(trigger);
-
- // jump state
- trigger = new Trigger(condJumpOnGround, new ActionSetVelocity(m_Body, Vector3.zero), TriggerOnlyOnce.On, TriggerSwallow.Off);
- jump.AddTrigger(trigger);
- trigger = new Trigger(Ands(condInAir, condRightCmd, condRight2Cmd), new List<ActionBase> { towardRight, switchToAirDash, new ActionSetVelocity(m_Body, new Vector3(25, 0, 0)), new ActionDontUseGravity(m_Body), enableAfterImage, midiumAfterImageInterval});
- jump.AddTrigger(trigger);
- trigger = new Trigger(Ands(condInAir, condLeftCmd, condLeft2Cmd), new List<ActionBase> { towardLeft, switchToAirDash, new ActionSetVelocity(m_Body, new Vector3(-25, 0, 0)), new ActionDontUseGravity(m_Body), enableAfterImage, midiumAfterImageInterval });
- jump.AddTrigger(trigger);
- trigger = new Trigger(Ands(condInAir, condCircleCmd), new List<ActionBase> { switchToAirAttk1, new ActionSetLocalVelocity(m_Body, new Vector3(0, 0, 0)), new ActionDontUseGravity(m_Body), enableAfterImage, smallAfterImageInterval});
- jump.AddTrigger(trigger);
- ConditionCheckJumpState condCheckJump = new ConditionCheckJumpState(jump, JumpState.Stage.None, JumpState.Direction.Neutral);
- trigger = new Trigger(And(condRightButtonHold, condCheckJump), new List<ActionBase> { towardRight, new ActionSetVelocityX(m_Body, 4)}, TriggerOnlyOnce.Off, TriggerSwallow.Off);
- jump.AddTrigger(trigger);
- trigger = new Trigger(And(condLeftButtonHold, condCheckJump), new List<ActionBase> { towardLeft, new ActionSetVelocityX(m_Body,-4) }, TriggerOnlyOnce.Off, TriggerSwallow.Off);
- jump.AddTrigger(trigger);
- //trigger = new Trigger(Ands(condCheckJump, Not(condRightButtonHold), Not(condLeftButtonHold)), new ActionSetVelocityX(m_Body, 0), TriggerOnlyOnce.Off, TriggerSwallow.Off);
- //jump.AddTrigger(trigger);
- trigger = new Trigger(Ands(new ConditionJumpDone(jump, 0.4f), condJumpOnGround, Or(condRightButtonHold, condLeftButtonHold)), switchToMove);
- jump.AddTrigger(trigger);
- trigger = new Trigger(condJumpDone, switchToIdle);
- jump.AddTrigger(trigger);
-
- // dash state
- trigger = new Trigger(And(new ConditionMotionRange(animator, 0.5f, 1.0f), condCircleCmd), switchToAttk1);
- dash.AddTrigger(trigger);
- trigger = new Trigger(new ConditionMotionAtEnd(animator, Anim_DashWithSword), switchToIdle);
- dash.AddTrigger(trigger);
-
- // attack states
- float expireTime = 0.3f;
-
- // sword normal attack
- ConditionMotionAtEnd condAttk1AtEnd = new ConditionMotionAtEnd(animator, Anim_LightAttack1);
- trigger = new Trigger(And(condAttk1AtEnd, condCircleCmd), switchToAttk2);
- attk1.AddTrigger(trigger);
- ConditionAttkExpireTime condAttk1ExpireTime = new ConditionAttkExpireTime(attk1, expireTime);
- trigger = new Trigger(condAttk1ExpireTime, switchToIdle);
- attk1.AddTrigger(trigger);
- attk1.AddTrigger(triggerTurnRight);
- attk1.AddTrigger(triggerTurnLeft);
- //trigger = new Trigger(condIsHit, new ActionLog("hit!!!"));
- //attk1.AddLateTrigger(trigger);
-
- //ConditionMotionRange condAttkRushGhostRange = new ConditionMotionRange(animator, 0f, 0.8f);
- //trigger = new Trigger(condAttkRushGhostRange, enableGhost, false);
- //attkRush.AddTrigger(trigger);
- //ConditionMotionRange condAttkRushGhostDisableRange = new ConditionMotionRange(animator, 0.8f, 10f);
- //trigger = new Trigger(condAttkRushGhostDisableRange, disableGhost, false);
- //attkRush.AddTrigger(trigger);
- ConditionMotionRange condAttkRushAtRange = new ConditionMotionRange(animator, 0.5f, 1f);
- trigger = new Trigger(And(condAttkRushAtRange, condCircleCmd), switchToAttk2);
- attkRush.AddTrigger(trigger);
- //trigger = new Trigger(And(And(condAttkRushAtRange, condTowardRight), condRightCmd), switchToAttkRush);
- //attkRush.AddTrigger(trigger);
- //trigger = new Trigger(And(And(condAttkRushAtRange, condTowardLeft), condLeftCmd), switchToAttkRush);
- //attkRush.AddTrigger(trigger);
- ConditionAttkExpireTime condAttkRushExpireTime = new ConditionAttkExpireTime(attkRush, expireTime);
- trigger = new Trigger(condAttkRushExpireTime, switchToIdle);
- attkRush.AddTrigger(trigger);
- //attkRush.AddTrigger(triggerTurnRight);
- //attkRush.AddTrigger(triggerTurnLeft);
-
- ConditionMotionAtEnd condAttk2AtEnd = new ConditionMotionAtEnd(animator, Anim_LightAttack2);
- trigger = new Trigger(And(condAttk2AtEnd, condCircleCmd), switchToAttk3);
- attk2.AddTrigger(trigger);
- ConditionAttkExpireTime condAttk2ExpireTime = new ConditionAttkExpireTime(attk2, expireTime);
- trigger = new Trigger(condAttk2ExpireTime, switchToIdle);
- attk2.AddTrigger(trigger);
- attk2.AddTrigger(triggerTurnRight);
- attk2.AddTrigger(triggerTurnLeft);
-
- ConditionMotionAtEnd condAttk3AtEnd = new ConditionMotionAtEnd(animator, Anim_LightAttack3);
- trigger = new Trigger(And(condAttk3AtEnd, condCircleCmd), switchToAttk4);
- attk3.AddTrigger(trigger);
- ConditionAttkExpireTime condAttk3ExpireTime = new ConditionAttkExpireTime(attk3, expireTime);
- trigger = new Trigger(condAttk3ExpireTime, switchToIdle);
- attk3.AddTrigger(trigger);
- attk3.AddTrigger(triggerTurnRight);
- attk3.AddTrigger(triggerTurnLeft);
-
- ConditionMotionAtEnd condAttk4AtEnd = new ConditionMotionAtEnd(animator, Anim_LightAttack4);
- trigger = new Trigger(And(condAttk4AtEnd, condCircleCmd), switchToAttk5);
- attk4.AddTrigger(trigger);
- ConditionAttkExpireTime condAttk4ExpireTime = new ConditionAttkExpireTime(attk4, expireTime);
- trigger = new Trigger(condAttk4ExpireTime, switchToIdle);
- attk4.AddTrigger(trigger);
- attk4.AddTrigger(triggerTurnRight);
- attk4.AddTrigger(triggerTurnLeft);
-
- ConditionMotionAtEnd condAttk5AtEnd = new ConditionMotionAtEnd(animator, Anim_LightAttack5);
- trigger = new Trigger(condAttk5AtEnd, switchToIdle);
- attk5.AddTrigger(trigger);
- ConditionAttkExpireTime condAttk5ExpireTime = new ConditionAttkExpireTime(attk5, expireTime);
- trigger = new Trigger(condAttk5ExpireTime, switchToIdle);
- attk5.AddTrigger(trigger);
- attk5.AddTrigger(triggerTurnRight);
- attk5.AddTrigger(triggerTurnLeft);
-
- // side kick normal
- ConditionMotionAtEnd condKickMotionEnd = new ConditionMotionAtEnd(animator, Anim_SideKick);
- trigger = new Trigger(condKickMotionEnd, new ActionSetVelocity(m_Body, Vector3.zero), TriggerOnlyOnce.On, TriggerSwallow.Off);
- sideKick.AddTrigger(trigger);
- ConditionAttkExpireTime condSideKickExpireTime = new ConditionAttkExpireTime(sideKick, expireTime);
- trigger = new Trigger(condSideKickExpireTime, switchToIdle);
- sideKick.AddTrigger(trigger);
-
- // side kick rush
- ConditionAttkExpireTime condSideKickRushExpireTime = new ConditionAttkExpireTime(sideKickRush, expireTime);
- trigger = new Trigger(condSideKickRushExpireTime, switchToIdle);
- sideKickRush.AddTrigger(trigger);
- ConditionMotionRange condSideKickRushMotionRange = new ConditionMotionRange(animator, 0.5f, 10f);
- trigger = new Trigger(And(condSideKickRushMotionRange, And(condRightButtonHold, condCircleCmd)), new List<ActionBase> { towardRight, switchToAttkRush });
- sideKickRush.AddTrigger(trigger);
- trigger = new Trigger(And(condSideKickRushMotionRange, And(condLeftButtonHold, condCircleCmd)), new List<ActionBase> { towardLeft, switchToAttkRush });
- sideKickRush.AddTrigger(trigger);
-
- // super kick combo
- ConditionMotionRange condSuperKickComboBegin = new ConditionMotionRange(animator, 0f, 1f);
- trigger = new Trigger(condSuperKickComboBegin, new ActionDontUseGravity(m_Body));
- superKick.AddTrigger(trigger);
- ConditionAttkExpireTime condSuperKickExpireTime = new ConditionAttkExpireTime(superKick, expireTime);
- trigger = new Trigger(condSuperKickExpireTime, new List < ActionBase >() { switchToIdle , new ActionUseGravity(m_Body) });
- superKick.AddTrigger(trigger);
-
- // gun normal
- ConditionMotionAtEnd condGun1AtEnd = new ConditionMotionAtEnd(animator, Anim_Gun1);
- trigger = new Trigger(And(condGun1AtEnd, condSquareCmd), switchToGun2);
- gun1.AddTrigger(trigger);
- ConditionAttkExpireTime condGun1ExpireTime = new ConditionAttkExpireTime(gun1, expireTime);
- trigger = new Trigger(condGun1ExpireTime, switchToIdle);
- gun1.AddTrigger(trigger);
-
- ConditionMotionAtEnd condGun2AtEnd = new ConditionMotionAtEnd(animator, Anim_Gun2);
- trigger = new Trigger(And(condGun2AtEnd, condSquareCmd), switchToGun3);
- gun2.AddTrigger(trigger);
- ConditionAttkExpireTime condGun2ExpireTime = new ConditionAttkExpireTime(gun2, expireTime);
- trigger = new Trigger(condGun2ExpireTime, switchToIdle);
- gun2.AddTrigger(trigger);
-
- ConditionMotionAtEnd condGun3AtEnd = new ConditionMotionAtEnd(animator, Anim_Gun3);
- trigger = new Trigger(And(condGun3AtEnd, condSquareCmd), switchToGun4);
- gun3.AddTrigger(trigger);
- ConditionAttkExpireTime condGun3ExpireTime = new ConditionAttkExpireTime(gun3, expireTime);
- trigger = new Trigger(condGun3ExpireTime, switchToIdle);
- gun3.AddTrigger(trigger);
-
- ConditionAttkExpireTime condGun4ExpireTime = new ConditionAttkExpireTime(gun4, expireTime);
- trigger = new Trigger(condGun4ExpireTime, switchToIdle);
- gun4.AddTrigger(trigger);
- ConditionMotionRange condGun4MotionRange = new ConditionMotionRange(animator, 0.6f, 1f);
- trigger = new Trigger(And(condGun4MotionRange, condRight2Cmd), new List<ActionBase> { switchToDash, towardRight });
- gun4.AddTrigger(trigger);
- trigger = new Trigger(And(condGun4MotionRange, condLeft2Cmd), new List<ActionBase> { switchToDash, towardLeft });
- gun4.AddTrigger(trigger);
-
- // air dash
- trigger = new Trigger(new ConditionMotionRange(animator, 0.8f, 1f), disaleAfterImage, TriggerOnlyOnce.On, TriggerSwallow.Off);
- airDash.AddTrigger(trigger);
- trigger = new Trigger(new ConditionMotionAtEnd(animator, Anim_AirDash), new List<ActionBase> { new ActionSetVelocity(m_Body, Vector3.zero), new ActionUseGravity(m_Body), toJump });
- airDash.AddTrigger(trigger);
-
- trigger = new Trigger(new ConditionMotionRange(animator, 0.18f, 1f), new ActionPlayEffect("Air_Attk1", this, new Vector3(-136.805f, 0, 0), new Vector3(0.8f, 0.8f, 0.8f)), TriggerOnlyOnce.On, TriggerSwallow.Off);
- airAttk1.AddTrigger(trigger);
- trigger = new Trigger(new ConditionMotionRange(animator, 0.6f,1f), disaleAfterImage, TriggerOnlyOnce.On, TriggerSwallow.Off);
- airAttk1.AddTrigger(trigger);
- trigger = new Trigger(new ConditionMotionAtEnd(animator, Anim_AirAttack1), new List<ActionBase> { new ActionSetVelocity(m_Body, Vector3.zero), new ActionUseGravity(m_Body), toJump});
- airAttk1.AddTrigger(trigger);
-
- m_StateController.ForceStart(idle);
- }
-
-} \ No newline at end of file
diff --git a/Assets/Scripts/Test/SaionjiScript_States.cs.meta b/Assets/Scripts/Test/SaionjiScript_States.cs.meta
deleted file mode 100644
index 10e51e09..00000000
--- a/Assets/Scripts/Test/SaionjiScript_States.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 1421bbd1c6a776d4b9dd2340b37d9a8b
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Scripts/Test/SaionjiUberAbility.cs b/Assets/Scripts/Test/SaionjiUberAbility.cs
deleted file mode 100644
index a058b4a6..00000000
--- a/Assets/Scripts/Test/SaionjiUberAbility.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-
-public class SaionjiUberState : UberState
-{
- Avatar m_Avatar;
- StateController m_StateController;
-
- public SaionjiUberState(Avatar avatar, StateController system)
- {
- m_Avatar = avatar;
- m_StateController = system;
- }
-
- public override void OnUpdate()
- {
- }
-
- public override void OnPhysicsUpdate()
- {
- }
-
-}
diff --git a/Assets/Scripts/Test/SaionjiUberAbility.cs.meta b/Assets/Scripts/Test/SaionjiUberAbility.cs.meta
deleted file mode 100644
index 54511638..00000000
--- a/Assets/Scripts/Test/SaionjiUberAbility.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 518687ee23ab1a8408e58ab11d3f5885
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant: