diff options
author | chai <chaifix@163.com> | 2020-11-09 08:49:19 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2020-11-09 08:49:19 +0800 |
commit | a3510f152994038c28b6c97490097e05b2c2cdc1 (patch) | |
tree | 55934ccb17d05135fb1e50b0c922b80a37166237 /Assets/Scripts | |
parent | b820dfe5486f230c2fdc8a8eba61a6a7f624fa87 (diff) |
*misc
Diffstat (limited to 'Assets/Scripts')
-rw-r--r-- | Assets/Scripts/Avatar/Abilities/JumpAbility.cs | 2 | ||||
-rw-r--r-- | Assets/Scripts/Effects/AfterImage/AfterImage.cs | 14 | ||||
-rw-r--r-- | Assets/Scripts/Effects/SparkManager.cs | 18 | ||||
-rw-r--r-- | Assets/Scripts/Effects/SparkManager.cs.meta | 11 | ||||
-rw-r--r-- | Assets/Scripts/Props.meta | 8 | ||||
-rw-r--r-- | Assets/Scripts/Test/SaionjiScript.cs | 24 |
6 files changed, 48 insertions, 29 deletions
diff --git a/Assets/Scripts/Avatar/Abilities/JumpAbility.cs b/Assets/Scripts/Avatar/Abilities/JumpAbility.cs index 5e953403..b83e8cfb 100644 --- a/Assets/Scripts/Avatar/Abilities/JumpAbility.cs +++ b/Assets/Scripts/Avatar/Abilities/JumpAbility.cs @@ -179,7 +179,7 @@ public class JumpAbility : AbilityBase if(m_CurAnim != m_CurUpMotion)
{
m_Body.LocalVelocity = m_CurInitVelocity;
- m_Animator.CrossFade(m_CurUpMotion, 0.2f);
+ m_Animator.CrossFade(m_CurUpMotion, 0.05f);
m_CurAnim = m_CurUpMotion;
}
if(m_Body.Velocity.y < 0)
diff --git a/Assets/Scripts/Effects/AfterImage/AfterImage.cs b/Assets/Scripts/Effects/AfterImage/AfterImage.cs index 123c0300..7f40e119 100644 --- a/Assets/Scripts/Effects/AfterImage/AfterImage.cs +++ b/Assets/Scripts/Effects/AfterImage/AfterImage.cs @@ -63,20 +63,6 @@ public class AfterImage : MonoBehaviour transform.gameObject.SetActive(true); myAnimator.Play(targetAnimator.GetCurrentAnimatorStateInfo(0).shortNameHash, 0, targetAnimator.GetCurrentAnimatorStateInfo(0).normalizedTime); - //myAnimator.Play(myCharacterControl.animator.GetCurrentAnimatorStateInfo(0).normalizedTime); - //myAnimator.no - - //foreach (AnimatorControllerParameter param in targetAnimator.parameters) - //{ - // if (param.type == AnimatorControllerParameterType.Float) - // { - // myAnimator.SetFloat(param.name, targetAnimator.GetFloat(param.name)); - // } - // if (param.type == AnimatorControllerParameterType.Int) - // { - // myAnimator.SetInteger(param.name, targetAnimator.GetInteger(param.name)); - // } - //} myAnimator.speed = 0.02f; myAnimator.Update(1/60f); diff --git a/Assets/Scripts/Effects/SparkManager.cs b/Assets/Scripts/Effects/SparkManager.cs new file mode 100644 index 00000000..0146d2e6 --- /dev/null +++ b/Assets/Scripts/Effects/SparkManager.cs @@ -0,0 +1,18 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class SparkManager : MonoBehaviour +{ + // Start is called before the first frame update + void Start() + { + + } + + // Update is called once per frame + void Update() + { + + } +} diff --git a/Assets/Scripts/Effects/SparkManager.cs.meta b/Assets/Scripts/Effects/SparkManager.cs.meta new file mode 100644 index 00000000..af46cd69 --- /dev/null +++ b/Assets/Scripts/Effects/SparkManager.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 91eb1bc63c2a55144830875dedab3793 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Props.meta b/Assets/Scripts/Props.meta deleted file mode 100644 index bb96602e..00000000 --- a/Assets/Scripts/Props.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: f299520ed9fcf4a45858ad4ef5a8d5d1 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Test/SaionjiScript.cs b/Assets/Scripts/Test/SaionjiScript.cs index c9bb3f05..b63d4f7c 100644 --- a/Assets/Scripts/Test/SaionjiScript.cs +++ b/Assets/Scripts/Test/SaionjiScript.cs @@ -4,15 +4,25 @@ using UnityEngine; public partial class SaionjiScript : Avatar
{
- HitBoxTest hitbox;
+ 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;
- public bool UsePistol;
- public bool UseBlade;
+ [SerializeField]
+ private Weapon m_Weapon;
public bool EnableAbilitySystem;
@@ -27,9 +37,11 @@ public partial class SaionjiScript : Avatar //animator.speed = 0;
PhysicsWorld.Instance.AddAnimator(animator);
- Go_PistolL.SetActive(UsePistol);
- Go_PistolR.SetActive(UsePistol);
- Go_Blade.SetActive(UseBlade);
+ 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();
|