fix gfx hit not sych with animation. Fix wrong animation timing with long weapon. Add animation scaling speed
This commit is contained in:
@@ -15,7 +15,7 @@ MonoBehaviour:
|
|||||||
m_DefaultGroup: 712e3991f28e549e7a56ee582a977810
|
m_DefaultGroup: 712e3991f28e549e7a56ee582a977810
|
||||||
m_currentHash:
|
m_currentHash:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
Hash: 00000000000000000000000000000000
|
Hash: 584471775533227dbfd66c0814b46e32
|
||||||
m_OptimizeCatalogSize: 0
|
m_OptimizeCatalogSize: 0
|
||||||
m_BuildRemoteCatalog: 0
|
m_BuildRemoteCatalog: 0
|
||||||
m_CatalogRequestsTimeout: 0
|
m_CatalogRequestsTimeout: 0
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -9754,7 +9754,7 @@ Transform:
|
|||||||
m_GameObject: {fileID: 5579818482848807075}
|
m_GameObject: {fileID: 5579818482848807075}
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
m_LocalPosition: {x: 2.89, y: -8.21, z: -0}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children: []
|
m_Children: []
|
||||||
@@ -9768,7 +9768,7 @@ ParticleSystem:
|
|||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 5579818482848807075}
|
m_GameObject: {fileID: 5579818482848807075}
|
||||||
serializedVersion: 8
|
serializedVersion: 8
|
||||||
lengthInSec: 100000
|
lengthInSec: 5
|
||||||
simulationSpeed: 1
|
simulationSpeed: 1
|
||||||
stopAction: 0
|
stopAction: 0
|
||||||
cullingMode: 0
|
cullingMode: 0
|
||||||
@@ -9843,7 +9843,7 @@ ParticleSystem:
|
|||||||
startLifetime:
|
startLifetime:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
minMaxState: 0
|
minMaxState: 0
|
||||||
scalar: Infinity
|
scalar: 1
|
||||||
minScalar: 5
|
minScalar: 5
|
||||||
maxCurve:
|
maxCurve:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
@@ -11085,7 +11085,7 @@ ParticleSystem:
|
|||||||
m_RotationOrder: 4
|
m_RotationOrder: 4
|
||||||
separateAxes: 0
|
separateAxes: 0
|
||||||
ColorModule:
|
ColorModule:
|
||||||
enabled: 0
|
enabled: 1
|
||||||
gradient:
|
gradient:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
minMaxState: 1
|
minMaxState: 1
|
||||||
@@ -11110,17 +11110,17 @@ ParticleSystem:
|
|||||||
ctime6: 0
|
ctime6: 0
|
||||||
ctime7: 0
|
ctime7: 0
|
||||||
atime0: 0
|
atime0: 0
|
||||||
atime1: 65535
|
atime1: 18504
|
||||||
atime2: 0
|
atime2: 37586
|
||||||
atime3: 0
|
atime3: 0
|
||||||
atime4: 0
|
atime4: 0
|
||||||
atime5: 0
|
atime5: 0
|
||||||
atime6: 0
|
atime6: 0
|
||||||
atime7: 0
|
atime7: 0
|
||||||
m_Mode: 0
|
m_Mode: 0
|
||||||
m_ColorSpace: -1
|
m_ColorSpace: 0
|
||||||
m_NumColorKeys: 2
|
m_NumColorKeys: 2
|
||||||
m_NumAlphaKeys: 2
|
m_NumAlphaKeys: 3
|
||||||
minGradient:
|
minGradient:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
key0: {r: 1, g: 1, b: 1, a: 1}
|
key0: {r: 1, g: 1, b: 1, a: 1}
|
||||||
@@ -14666,7 +14666,7 @@ ParticleSystem:
|
|||||||
ringBufferMode: 0
|
ringBufferMode: 0
|
||||||
ringBufferLoopRange: {x: 0, y: 1}
|
ringBufferLoopRange: {x: 0, y: 1}
|
||||||
emitterVelocityMode: 0
|
emitterVelocityMode: 0
|
||||||
looping: 1
|
looping: 0
|
||||||
prewarm: 0
|
prewarm: 0
|
||||||
playOnAwake: 1
|
playOnAwake: 1
|
||||||
useUnscaledTime: 0
|
useUnscaledTime: 0
|
||||||
@@ -15504,7 +15504,7 @@ ParticleSystem:
|
|||||||
outWeight: 0.33333334
|
outWeight: 0.33333334
|
||||||
- serializedVersion: 3
|
- serializedVersion: 3
|
||||||
time: 1
|
time: 1
|
||||||
value: 1
|
value: 0.21538544
|
||||||
inSlope: 0
|
inSlope: 0
|
||||||
outSlope: 0
|
outSlope: 0
|
||||||
tangentMode: 0
|
tangentMode: 0
|
||||||
@@ -15926,8 +15926,8 @@ ParticleSystem:
|
|||||||
maxColor: {r: 1, g: 1, b: 1, a: 1}
|
maxColor: {r: 1, g: 1, b: 1, a: 1}
|
||||||
maxGradient:
|
maxGradient:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
key0: {r: 1, g: 1, b: 1, a: 1}
|
key0: {r: 1, g: 1, b: 1, a: 0.22352941}
|
||||||
key1: {r: 1, g: 1, b: 1, a: 0}
|
key1: {r: 1, g: 1, b: 1, a: 1}
|
||||||
key2: {r: 0, g: 0, b: 0, a: 0}
|
key2: {r: 0, g: 0, b: 0, a: 0}
|
||||||
key3: {r: 0, g: 0, b: 0, a: 0}
|
key3: {r: 0, g: 0, b: 0, a: 0}
|
||||||
key4: {r: 0, g: 0, b: 0, a: 0}
|
key4: {r: 0, g: 0, b: 0, a: 0}
|
||||||
@@ -15943,8 +15943,8 @@ ParticleSystem:
|
|||||||
ctime6: 0
|
ctime6: 0
|
||||||
ctime7: 0
|
ctime7: 0
|
||||||
atime0: 0
|
atime0: 0
|
||||||
atime1: 45875
|
atime1: 12336
|
||||||
atime2: 0
|
atime2: 23901
|
||||||
atime3: 0
|
atime3: 0
|
||||||
atime4: 0
|
atime4: 0
|
||||||
atime5: 0
|
atime5: 0
|
||||||
@@ -15953,7 +15953,7 @@ ParticleSystem:
|
|||||||
m_Mode: 0
|
m_Mode: 0
|
||||||
m_ColorSpace: 0
|
m_ColorSpace: 0
|
||||||
m_NumColorKeys: 2
|
m_NumColorKeys: 2
|
||||||
m_NumAlphaKeys: 2
|
m_NumAlphaKeys: 3
|
||||||
minGradient:
|
minGradient:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
key0: {r: 1, g: 1, b: 1, a: 1}
|
key0: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ Transform:
|
|||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
m_LocalScale: {x: 0.2, y: 0.2, z: 0.2}
|
m_LocalScale: {x: 0.33, y: 0.33, z: 0.33}
|
||||||
m_ConstrainProportionsScale: 1
|
m_ConstrainProportionsScale: 1
|
||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 3864086195955648519}
|
m_Father: {fileID: 3864086195955648519}
|
||||||
@@ -4919,7 +4919,7 @@ Transform:
|
|||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
m_LocalScale: {x: 0.2, y: 0.2, z: 0.2}
|
m_LocalScale: {x: 0.33, y: 0.33, z: 0.33}
|
||||||
m_ConstrainProportionsScale: 1
|
m_ConstrainProportionsScale: 1
|
||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 3864086195955648519}
|
m_Father: {fileID: 3864086195955648519}
|
||||||
@@ -9752,7 +9752,7 @@ Transform:
|
|||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
m_LocalScale: {x: 0.2, y: 0.2, z: 0.2}
|
m_LocalScale: {x: 0.33, y: 0.33, z: 0.33}
|
||||||
m_ConstrainProportionsScale: 1
|
m_ConstrainProportionsScale: 1
|
||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 3864086195955648519}
|
m_Father: {fileID: 3864086195955648519}
|
||||||
@@ -9780,7 +9780,7 @@ ParticleSystem:
|
|||||||
startDelay:
|
startDelay:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
minMaxState: 0
|
minMaxState: 0
|
||||||
scalar: 0
|
scalar: 0.1
|
||||||
minScalar: 0
|
minScalar: 0
|
||||||
maxCurve:
|
maxCurve:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
@@ -9840,7 +9840,7 @@ ParticleSystem:
|
|||||||
startLifetime:
|
startLifetime:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
minMaxState: 0
|
minMaxState: 0
|
||||||
scalar: 0.355
|
scalar: 0.4
|
||||||
minScalar: 5
|
minScalar: 5
|
||||||
maxCurve:
|
maxCurve:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
@@ -14641,7 +14641,7 @@ Transform:
|
|||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 4849499681526862356}
|
m_GameObject: {fileID: 4849499681526862356}
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_LocalRotation: {x: -0.7071068, y: 0, z: 0, w: 0.7071068}
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
@@ -14655,7 +14655,7 @@ Transform:
|
|||||||
- {fileID: 5381404926944729450}
|
- {fileID: 5381404926944729450}
|
||||||
- {fileID: 5689587104162002440}
|
- {fileID: 5689587104162002440}
|
||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
m_LocalEulerAnglesHint: {x: -90, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
--- !u!198 &547135593973638648
|
--- !u!198 &547135593973638648
|
||||||
ParticleSystem:
|
ParticleSystem:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@@ -19484,7 +19484,7 @@ Transform:
|
|||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
m_LocalScale: {x: 0.2, y: 0.2, z: 0.2}
|
m_LocalScale: {x: 0.3, y: 0.3, z: 0.3}
|
||||||
m_ConstrainProportionsScale: 1
|
m_ConstrainProportionsScale: 1
|
||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 3864086195955648519}
|
m_Father: {fileID: 3864086195955648519}
|
||||||
@@ -20823,25 +20823,25 @@ ParticleSystem:
|
|||||||
maxGradient:
|
maxGradient:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
key0: {r: 1, g: 1, b: 1, a: 1}
|
key0: {r: 1, g: 1, b: 1, a: 1}
|
||||||
key1: {r: 1, g: 1, b: 1, a: 0}
|
key1: {r: 1, g: 1, b: 1, a: 1}
|
||||||
key2: {r: 0, g: 0, b: 0, a: 0}
|
key2: {r: 1, g: 1, b: 1, a: 0.7619142}
|
||||||
key3: {r: 0, g: 0, b: 0, a: 0}
|
key3: {r: 1, g: 1, b: 1, a: 0}
|
||||||
key4: {r: 0, g: 0, b: 0, a: 0}
|
key4: {r: 0, g: 0, b: 0, a: 0}
|
||||||
key5: {r: 0, g: 0, b: 0, a: 0}
|
key5: {r: 0, g: 0, b: 0, a: 0}
|
||||||
key6: {r: 0, g: 0, b: 0, a: 0}
|
key6: {r: 0, g: 0, b: 0, a: 0}
|
||||||
key7: {r: 0, g: 0, b: 0, a: 0}
|
key7: {r: 0, g: 0, b: 0, a: 0}
|
||||||
ctime0: 0
|
ctime0: 0
|
||||||
ctime1: 65535
|
ctime1: 65535
|
||||||
ctime2: 0
|
ctime2: 65535
|
||||||
ctime3: 0
|
ctime3: 65535
|
||||||
ctime4: 0
|
ctime4: 0
|
||||||
ctime5: 0
|
ctime5: 0
|
||||||
ctime6: 0
|
ctime6: 0
|
||||||
ctime7: 0
|
ctime7: 0
|
||||||
atime0: 0
|
atime0: 0
|
||||||
atime1: 65535
|
atime1: 25058
|
||||||
atime2: 0
|
atime2: 34695
|
||||||
atime3: 0
|
atime3: 65535
|
||||||
atime4: 0
|
atime4: 0
|
||||||
atime5: 0
|
atime5: 0
|
||||||
atime6: 0
|
atime6: 0
|
||||||
@@ -20849,7 +20849,7 @@ ParticleSystem:
|
|||||||
m_Mode: 0
|
m_Mode: 0
|
||||||
m_ColorSpace: 0
|
m_ColorSpace: 0
|
||||||
m_NumColorKeys: 2
|
m_NumColorKeys: 2
|
||||||
m_NumAlphaKeys: 2
|
m_NumAlphaKeys: 4
|
||||||
minGradient:
|
minGradient:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
key0: {r: 1, g: 1, b: 1, a: 1}
|
key0: {r: 1, g: 1, b: 1, a: 1}
|
||||||
@@ -24375,7 +24375,7 @@ Transform:
|
|||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
m_LocalScale: {x: 0.2, y: 0.2, z: 0.2}
|
m_LocalScale: {x: 0.3, y: 0.3, z: 0.3}
|
||||||
m_ConstrainProportionsScale: 1
|
m_ConstrainProportionsScale: 1
|
||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 3864086195955648519}
|
m_Father: {fileID: 3864086195955648519}
|
||||||
@@ -25714,25 +25714,25 @@ ParticleSystem:
|
|||||||
maxGradient:
|
maxGradient:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
key0: {r: 1, g: 1, b: 1, a: 1}
|
key0: {r: 1, g: 1, b: 1, a: 1}
|
||||||
key1: {r: 1, g: 1, b: 1, a: 0}
|
key1: {r: 1, g: 1, b: 1, a: 1}
|
||||||
key2: {r: 0, g: 0, b: 0, a: 0}
|
key2: {r: 1, g: 1, b: 1, a: 0.7619142}
|
||||||
key3: {r: 0, g: 0, b: 0, a: 0}
|
key3: {r: 1, g: 1, b: 1, a: 0}
|
||||||
key4: {r: 0, g: 0, b: 0, a: 0}
|
key4: {r: 0, g: 0, b: 0, a: 0}
|
||||||
key5: {r: 0, g: 0, b: 0, a: 0}
|
key5: {r: 0, g: 0, b: 0, a: 0}
|
||||||
key6: {r: 0, g: 0, b: 0, a: 0}
|
key6: {r: 0, g: 0, b: 0, a: 0}
|
||||||
key7: {r: 0, g: 0, b: 0, a: 0}
|
key7: {r: 0, g: 0, b: 0, a: 0}
|
||||||
ctime0: 0
|
ctime0: 0
|
||||||
ctime1: 65535
|
ctime1: 65535
|
||||||
ctime2: 0
|
ctime2: 65535
|
||||||
ctime3: 0
|
ctime3: 65535
|
||||||
ctime4: 0
|
ctime4: 0
|
||||||
ctime5: 0
|
ctime5: 0
|
||||||
ctime6: 0
|
ctime6: 0
|
||||||
ctime7: 0
|
ctime7: 0
|
||||||
atime0: 0
|
atime0: 0
|
||||||
atime1: 65535
|
atime1: 25058
|
||||||
atime2: 0
|
atime2: 34695
|
||||||
atime3: 0
|
atime3: 65535
|
||||||
atime4: 0
|
atime4: 0
|
||||||
atime5: 0
|
atime5: 0
|
||||||
atime6: 0
|
atime6: 0
|
||||||
@@ -25740,7 +25740,7 @@ ParticleSystem:
|
|||||||
m_Mode: 0
|
m_Mode: 0
|
||||||
m_ColorSpace: 0
|
m_ColorSpace: 0
|
||||||
m_NumColorKeys: 2
|
m_NumColorKeys: 2
|
||||||
m_NumAlphaKeys: 2
|
m_NumAlphaKeys: 4
|
||||||
minGradient:
|
minGradient:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
key0: {r: 1, g: 1, b: 1, a: 1}
|
key0: {r: 1, g: 1, b: 1, a: 1}
|
||||||
@@ -29266,7 +29266,7 @@ Transform:
|
|||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
m_LocalScale: {x: 0.2, y: 0.2, z: 0.2}
|
m_LocalScale: {x: 0.33, y: 0.33, z: 0.33}
|
||||||
m_ConstrainProportionsScale: 1
|
m_ConstrainProportionsScale: 1
|
||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 3864086195955648519}
|
m_Father: {fileID: 3864086195955648519}
|
||||||
@@ -34099,7 +34099,7 @@ Transform:
|
|||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
m_LocalScale: {x: 0.2, y: 0.2, z: 0.2}
|
m_LocalScale: {x: 0.3, y: 0.3, z: 0.3}
|
||||||
m_ConstrainProportionsScale: 1
|
m_ConstrainProportionsScale: 1
|
||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 3864086195955648519}
|
m_Father: {fileID: 3864086195955648519}
|
||||||
@@ -35438,25 +35438,25 @@ ParticleSystem:
|
|||||||
maxGradient:
|
maxGradient:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
key0: {r: 1, g: 1, b: 1, a: 1}
|
key0: {r: 1, g: 1, b: 1, a: 1}
|
||||||
key1: {r: 1, g: 1, b: 1, a: 0}
|
key1: {r: 1, g: 1, b: 1, a: 1}
|
||||||
key2: {r: 0, g: 0, b: 0, a: 0}
|
key2: {r: 1, g: 1, b: 1, a: 0.7619142}
|
||||||
key3: {r: 0, g: 0, b: 0, a: 0}
|
key3: {r: 1, g: 1, b: 1, a: 0}
|
||||||
key4: {r: 0, g: 0, b: 0, a: 0}
|
key4: {r: 0, g: 0, b: 0, a: 0}
|
||||||
key5: {r: 0, g: 0, b: 0, a: 0}
|
key5: {r: 0, g: 0, b: 0, a: 0}
|
||||||
key6: {r: 0, g: 0, b: 0, a: 0}
|
key6: {r: 0, g: 0, b: 0, a: 0}
|
||||||
key7: {r: 0, g: 0, b: 0, a: 0}
|
key7: {r: 0, g: 0, b: 0, a: 0}
|
||||||
ctime0: 0
|
ctime0: 0
|
||||||
ctime1: 65535
|
ctime1: 65535
|
||||||
ctime2: 0
|
ctime2: 65535
|
||||||
ctime3: 0
|
ctime3: 65535
|
||||||
ctime4: 0
|
ctime4: 0
|
||||||
ctime5: 0
|
ctime5: 0
|
||||||
ctime6: 0
|
ctime6: 0
|
||||||
ctime7: 0
|
ctime7: 0
|
||||||
atime0: 0
|
atime0: 0
|
||||||
atime1: 65535
|
atime1: 25058
|
||||||
atime2: 0
|
atime2: 34695
|
||||||
atime3: 0
|
atime3: 65535
|
||||||
atime4: 0
|
atime4: 0
|
||||||
atime5: 0
|
atime5: 0
|
||||||
atime6: 0
|
atime6: 0
|
||||||
@@ -35464,7 +35464,7 @@ ParticleSystem:
|
|||||||
m_Mode: 0
|
m_Mode: 0
|
||||||
m_ColorSpace: 0
|
m_ColorSpace: 0
|
||||||
m_NumColorKeys: 2
|
m_NumColorKeys: 2
|
||||||
m_NumAlphaKeys: 2
|
m_NumAlphaKeys: 4
|
||||||
minGradient:
|
minGradient:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
key0: {r: 1, g: 1, b: 1, a: 1}
|
key0: {r: 1, g: 1, b: 1, a: 1}
|
||||||
@@ -38990,7 +38990,7 @@ Transform:
|
|||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
m_LocalScale: {x: 0.2, y: 0.2, z: 0.2}
|
m_LocalScale: {x: 0.3, y: 0.3, z: 0.3}
|
||||||
m_ConstrainProportionsScale: 1
|
m_ConstrainProportionsScale: 1
|
||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 3864086195955648519}
|
m_Father: {fileID: 3864086195955648519}
|
||||||
@@ -40329,25 +40329,25 @@ ParticleSystem:
|
|||||||
maxGradient:
|
maxGradient:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
key0: {r: 1, g: 1, b: 1, a: 1}
|
key0: {r: 1, g: 1, b: 1, a: 1}
|
||||||
key1: {r: 1, g: 1, b: 1, a: 0}
|
key1: {r: 1, g: 1, b: 1, a: 1}
|
||||||
key2: {r: 0, g: 0, b: 0, a: 0}
|
key2: {r: 1, g: 1, b: 1, a: 0.7619142}
|
||||||
key3: {r: 0, g: 0, b: 0, a: 0}
|
key3: {r: 1, g: 1, b: 1, a: 0}
|
||||||
key4: {r: 0, g: 0, b: 0, a: 0}
|
key4: {r: 0, g: 0, b: 0, a: 0}
|
||||||
key5: {r: 0, g: 0, b: 0, a: 0}
|
key5: {r: 0, g: 0, b: 0, a: 0}
|
||||||
key6: {r: 0, g: 0, b: 0, a: 0}
|
key6: {r: 0, g: 0, b: 0, a: 0}
|
||||||
key7: {r: 0, g: 0, b: 0, a: 0}
|
key7: {r: 0, g: 0, b: 0, a: 0}
|
||||||
ctime0: 0
|
ctime0: 0
|
||||||
ctime1: 65535
|
ctime1: 65535
|
||||||
ctime2: 0
|
ctime2: 65535
|
||||||
ctime3: 0
|
ctime3: 65535
|
||||||
ctime4: 0
|
ctime4: 0
|
||||||
ctime5: 0
|
ctime5: 0
|
||||||
ctime6: 0
|
ctime6: 0
|
||||||
ctime7: 0
|
ctime7: 0
|
||||||
atime0: 0
|
atime0: 0
|
||||||
atime1: 65535
|
atime1: 25058
|
||||||
atime2: 0
|
atime2: 34695
|
||||||
atime3: 0
|
atime3: 65535
|
||||||
atime4: 0
|
atime4: 0
|
||||||
atime5: 0
|
atime5: 0
|
||||||
atime6: 0
|
atime6: 0
|
||||||
@@ -40355,7 +40355,7 @@ ParticleSystem:
|
|||||||
m_Mode: 0
|
m_Mode: 0
|
||||||
m_ColorSpace: 0
|
m_ColorSpace: 0
|
||||||
m_NumColorKeys: 2
|
m_NumColorKeys: 2
|
||||||
m_NumAlphaKeys: 2
|
m_NumAlphaKeys: 4
|
||||||
minGradient:
|
minGradient:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
key0: {r: 1, g: 1, b: 1, a: 1}
|
key0: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
|||||||
@@ -67,7 +67,6 @@ namespace BrewMonster.Scripts
|
|||||||
public override bool Tick(float dwDeltaTime)
|
public override bool Tick(float dwDeltaTime)
|
||||||
{
|
{
|
||||||
base.Tick(dwDeltaTime * 1000);
|
base.Tick(dwDeltaTime * 1000);
|
||||||
//BMLogger.Log($" m_OverTimeCnt m_dwCounter:{m_OverTimeCnt.m_dwCounter}, m_dwPeriod:{m_OverTimeCnt.m_dwPeriod} ");
|
|
||||||
if (m_OverTimeCnt.IncCounter(dwDeltaTime * 1000,out float fCounter,out float fPeriod))
|
if (m_OverTimeCnt.IncCounter(dwDeltaTime * 1000,out float fCounter,out float fPeriod))
|
||||||
{
|
{
|
||||||
m_bFinished = true;
|
m_bFinished = true;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using BrewMonster.Managers;
|
using BrewMonster.Managers;
|
||||||
using BrewMonster.Network;
|
using BrewMonster.Network;
|
||||||
using BrewMonster.PerfectWorld.Scripts.Vfx;
|
using BrewMonster.PerfectWorld.Scripts.Vfx;
|
||||||
using BrewMonster.Scripts;
|
using BrewMonster.Scripts;
|
||||||
@@ -1688,20 +1688,20 @@ namespace BrewMonster
|
|||||||
}
|
}
|
||||||
|
|
||||||
// melee attack
|
// melee attack
|
||||||
CECAttackEvent pAttack1 = CECAttacksMan.Instance.AddMeleeAttack(
|
CECAttackEvent pAttack = CECAttacksMan.Instance.AddMeleeAttack(
|
||||||
GetPlayerInfo().cid, idTarget, idWeapon, dwModifier, nDamage, nTimeFly);
|
GetPlayerInfo().cid, idTarget, idWeapon, dwModifier, nDamage, nTimeFly);
|
||||||
|
|
||||||
if (pAttack1 != null)
|
if (pAttack != null)
|
||||||
{
|
{
|
||||||
if (!IsDead() && (dwModifier & (uint)MOD.MOD_RETORT) == 0
|
if (!IsDead() && (dwModifier & (uint)MOD.MOD_RETORT) == 0
|
||||||
&& (dwModifier & (uint)MOD.MOD_ATTACK_AURA) == 0
|
&& (dwModifier & (uint)MOD.MOD_ATTACK_AURA) == 0
|
||||||
&& PlayAttackAction(nAttackSpeed, ref piAttackTime, pAttack1)
|
&& PlayAttackAction(nAttackSpeed, ref piAttackTime, pAttack)
|
||||||
&& (dwModifier & (uint)MOD.MOD_BEAT_BACK) == 0)
|
&& (dwModifier & (uint)MOD.MOD_BEAT_BACK) == 0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
pAttack1.m_bSignaled = true;
|
pAttack.m_bSignaled = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1721,11 +1721,11 @@ namespace BrewMonster
|
|||||||
CECAttackerEvents attackerEvents = CECAttacksMan.Instance.FindAttackByAttacker(GetPlayerInfo().cid);
|
CECAttackerEvents attackerEvents = CECAttacksMan.Instance.FindAttackByAttacker(GetPlayerInfo().cid);
|
||||||
if (attackerEvents)
|
if (attackerEvents)
|
||||||
{
|
{
|
||||||
CECAttackEvent pAttack1 = attackerEvents.Find(idSkill, nSection);
|
pAttack = attackerEvents.Find(idSkill, nSection);
|
||||||
if (pAttack1 != null)
|
if (pAttack != null)
|
||||||
{
|
{
|
||||||
// Ãæ¹¥»÷µÄ·ÇµÚÒ»´ÎÉ˺¦ÏûÏ¢
|
// Ãæ¹¥»÷µÄ·ÇµÚÒ»´ÎÉ˺¦ÏûÏ¢
|
||||||
pAttack1.AddTarget(idTarget, dwModifier, nDamage);
|
pAttack.AddTarget(idTarget, dwModifier, nDamage);
|
||||||
goto EXIT;
|
goto EXIT;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -1755,7 +1755,6 @@ namespace BrewMonster
|
|||||||
&& PlaySkillAttackAction(idSkill, nAttackSpeed, ref unusedInt, nSection, pAttack)
|
&& PlaySkillAttackAction(idSkill, nAttackSpeed, ref unusedInt, nSection, pAttack)
|
||||||
&& (dwModifier & (uint)MOD.MOD_BEAT_BACK) == 0)
|
&& (dwModifier & (uint)MOD.MOD_BEAT_BACK) == 0)
|
||||||
{
|
{
|
||||||
pAttack.m_bSignaled = true;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1805,38 +1804,30 @@ namespace BrewMonster
|
|||||||
// ==============================
|
// ==============================
|
||||||
if (GetMoveEnv() == (int)MoveEnvironment.MOVEENV_GROUND)
|
if (GetMoveEnv() == (int)MoveEnvironment.MOVEENV_GROUND)
|
||||||
{
|
{
|
||||||
|
string szActRise = EC_Utility.BuildActionName(action, weapon_type, "起");
|
||||||
|
string szActFall = EC_Utility.BuildActionName(action, weapon_type, "落");
|
||||||
|
|
||||||
|
nTime1 = m_pPlayerCECModel.GetComActTimeSpanByName(szActRise);
|
||||||
|
nTime2 = m_pPlayerCECModel.GetComActTimeSpanByName(szActFall);
|
||||||
|
|
||||||
|
// 调整动画速度以匹配攻击速度 / Adjust animation speed to match attack speed
|
||||||
|
if (nAttackSpeed > 0)
|
||||||
|
{
|
||||||
|
float vScale = (nTime1 + nTime2) / (float)nAttackSpeed;
|
||||||
|
if (vScale > 0f)
|
||||||
|
m_pPlayerCECModel.SetPlaySpeed(vScale);
|
||||||
|
}
|
||||||
|
|
||||||
// “起�? 动作(挥起)
|
|
||||||
szAct = EC_Utility.BuildActionName(action, weapon_type, "起");
|
|
||||||
int iTransTime = 200;
|
int iTransTime = 200;
|
||||||
m_pActionController.PlayNonSkillActionWithName(iAction, szAct, true, iTransTime, bHideFX, attackEvent,COMACT_FLAG_MODE_ONCE_MULTIIGNOREGFX);
|
m_pActionController.PlayNonSkillActionWithName(iAction, szActRise, true, iTransTime, bHideFX, attackEvent, COMACT_FLAG_MODE_ONCE_MULTIIGNOREGFX);
|
||||||
//swing sfx
|
// if (pRightHandWeapon != null && IsUsingMagicWeapon())
|
||||||
//workaround for sound effect delay, it need to trigger via weapon combine action
|
// pRightHandWeapon.PlayActionByName(_GenWeaponActionName(szActRise, m_iGender), 1.0f, true, iTransTime, true, iAction, bHideFX);
|
||||||
SFXManager.Instance.PlaySkillSfxAtPointAsync(soundPath, Vector3.zero,iTransTime/1000f).Forget();
|
SFXManager.Instance.PlaySkillSfxAtPointAsync(soundPath, Vector3.zero, iTransTime / 1000f).Forget();
|
||||||
|
|
||||||
szAct = EC_Utility.BuildActionName(action, weapon_type, "落");
|
m_pActionController.QueueNonSkillActionWithName(iAction, szActFall, 0, false, bHideFX);
|
||||||
m_pActionController.QueueNonSkillActionWithName(iAction, szAct, 0, false, bHideFX);
|
// if (pRightHandWeapon != null && IsUsingMagicWeapon())
|
||||||
|
// pRightHandWeapon.QueueAction(_GenWeaponActionName(szActFall, m_iGender), 0, iAction, false, false, bHideFX);
|
||||||
//hit sfx
|
SFXManager.Instance.PlaySkillSfxAtPointAsync(hitSoundPath, Vector3.zero, iTransTime / 1000f + .1f).Forget();
|
||||||
//workaround for sound effect delay, it need to trigger via weapon combine action
|
|
||||||
//.1f is a magic number to make sure the sound effect is triggered after the action is finished
|
|
||||||
SFXManager.Instance.PlaySkillSfxAtPointAsync(hitSoundPath, Vector3.zero,iTransTime/1000f+.1f).Forget();
|
|
||||||
|
|
||||||
//PlayNonSkillActionWithName(iAction, szAct, true, 200, true, ref pActFlag, COMACT_FLAG_MODE_ONCE_MULTIIGNOREGFX);gagága
|
|
||||||
/*
|
|
||||||
if (pRightHandWeapon != null && IsUsingMagicWeapon())
|
|
||||||
pRightHandWeapon.PlayActionByName(_GenWeaponActionName(szAct, m_iGender), 1.0f, true, 200, true, iAction, bHideFX);
|
|
||||||
|
|
||||||
nTime1 = _pPlayerModel.GetComActTimeSpanByName(szAct);
|
|
||||||
|
|
||||||
// “收” 动作(挥下)
|
|
||||||
szAct = $"{action.data.action_prefix}_{action.data.action_weapon_suffix[weapon_type].suffix}Âä";
|
|
||||||
QueueNonSkillActionWithName(iAction, szAct, 0, false, bHideFX);
|
|
||||||
|
|
||||||
if (pRightHandWeapon != null && IsUsingMagicWeapon())
|
|
||||||
pRightHandWeapon.QueueAction(_GenWeaponActionName(szAct, m_iGender), 0, iAction, false, false, bHideFX);
|
|
||||||
|
|
||||||
nTime2 = _pPlayerModel.GetComActTimeSpanByName(szAct);*/
|
|
||||||
}
|
}
|
||||||
// ==============================
|
// ==============================
|
||||||
// Air Attack
|
// Air Attack
|
||||||
@@ -1851,59 +1842,49 @@ namespace BrewMonster
|
|||||||
GetProfession() == (int)PROFESSION.PROF_MONK ||
|
GetProfession() == (int)PROFESSION.PROF_MONK ||
|
||||||
GetProfession() == (int)PROFESSION.PROF_GHOST)
|
GetProfession() == (int)PROFESSION.PROF_GHOST)
|
||||||
{
|
{
|
||||||
szActionMiddleName = "空中翅膀"; // tấn công trên không
|
szActionMiddleName = "空中翅膀"; // Air with wings / 空中翅膀
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
szActionMiddleName = "空中飞剑"; // rơi xuống hoặc bay
|
szActionMiddleName = "空中飞剑"; // Air with sword / 空中飞剑
|
||||||
}
|
}
|
||||||
|
|
||||||
szAct = EC_Utility.BuildActionName(action, weapon_type, "起", szActionMiddleName);
|
string szActRiseAir = EC_Utility.BuildActionName(action, weapon_type, "起", szActionMiddleName);
|
||||||
//EventBus.PublishChannel(m_PlayerInfo.cid, new PlayActionEvent(szShapeName, szAct, 200, true));
|
string szActFallAir = EC_Utility.BuildActionName(action, weapon_type, "落", szActionMiddleName);
|
||||||
m_pActionController.PlayNonSkillActionWithName(iAction, szAct, true, 200);
|
|
||||||
// if (pRightHandWeapon != null && IsUsingMagicWeapon())
|
|
||||||
// pRightHandWeapon.PlayActionByName(_GenWeaponActionName(szAct, m_iGender), 1.0f, true, 200, true, iAction, bHideFX);
|
|
||||||
|
|
||||||
// nTime1 = m_pPlayerModel.GetComActTimeSpanByName(szAct);
|
nTime1 = m_pPlayerCECModel.GetComActTimeSpanByName(szActRiseAir);
|
||||||
|
nTime2 = m_pPlayerCECModel.GetComActTimeSpanByName(szActFallAir);
|
||||||
|
|
||||||
szAct = EC_Utility.BuildActionName(action, weapon_type, "落", szActionMiddleName);
|
// 调整动画速度以匹配攻击速度 / Adjust animation speed to match attack speed
|
||||||
//EventBus.PublishChannelClass(m_PlayerInfo.cid, queueActionEvent);
|
if (nAttackSpeed > 0)
|
||||||
m_pActionController.QueueNonSkillActionWithName(iAction, szAct, 0, false, false, true, false);
|
|
||||||
|
|
||||||
// if (pRightHandWeapon != null && IsUsingMagicWeapon())
|
|
||||||
// pRightHandWeapon.QueueAction(_GenWeaponActionName(szAct, m_iGender), 0, iAction, false, false, bHideFX);
|
|
||||||
|
|
||||||
// nTime2 = m_pPlayerModel.GetComActTimeSpanByName(szAct);
|
|
||||||
}
|
|
||||||
|
|
||||||
// ==============================
|
|
||||||
// Kết thúc bằng FightStand
|
|
||||||
// ==============================
|
|
||||||
PLAYER_ACTION stand_action = m_PlayerActions[(int)PLAYER_ACTION_TYPE.ACT_FIGHTSTAND];
|
|
||||||
szAct = EC_Utility.BuildActionName(stand_action, 0);
|
|
||||||
int iTranstime = 300;
|
|
||||||
m_pActionController.QueueNonSkillActionWithName(iAction, szAct, iTranstime, false, false, true, false);
|
|
||||||
/* QueueNonSkillActionWithName(ACT_FIGHTSTAND, szAct, 300, false, bHideFX, true);
|
|
||||||
|
|
||||||
if (pRightHandWeapon != null && IsUsingMagicWeapon())
|
|
||||||
pRightHandWeapon.QueueAction(_GenWeaponActionName(szAct, m_iGender), 300, iAction, false, false, bHideFX, true);*/
|
|
||||||
|
|
||||||
// ==============================
|
|
||||||
// Điều chỉnh tốc độ phát animation theo tốc độ tấn công
|
|
||||||
// ==============================
|
|
||||||
/* if (nAttackSpeed > 0)
|
|
||||||
{
|
{
|
||||||
float vScale = (nTime1 + nTime2) / (float)nAttackSpeed;
|
float vScale = (nTime1 + nTime2) / (float)nAttackSpeed;
|
||||||
if (vScale > 0f)
|
if (vScale > 0f)
|
||||||
{
|
m_pPlayerCECModel.SetPlaySpeed(vScale);
|
||||||
m_pPlayerModel.SetPlaySpeed(vScale);
|
|
||||||
|
|
||||||
if (pRightHandWeapon != null && IsUsingMagicWeapon())
|
|
||||||
pRightHandWeapon.SetPlaySpeed(vScale);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
attackTime = nTime1 + nTime2;*/
|
m_pActionController.PlayNonSkillActionWithName(iAction, szActRiseAir, true, 200);
|
||||||
|
// if (pRightHandWeapon != null && IsUsingMagicWeapon())
|
||||||
|
// pRightHandWeapon.PlayActionByName(_GenWeaponActionName(szActRiseAir, m_iGender), 1.0f, true, 200, true, iAction, bHideFX);
|
||||||
|
|
||||||
|
m_pActionController.QueueNonSkillActionWithName(iAction, szActFallAir, 0, false, false, true, false);
|
||||||
|
// if (pRightHandWeapon != null && IsUsingMagicWeapon())
|
||||||
|
// pRightHandWeapon.QueueAction(_GenWeaponActionName(szActFallAir, m_iGender), 0, iAction, false, false, bHideFX);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ==============================
|
||||||
|
// Queue FightStand / 结束动作
|
||||||
|
// ==============================
|
||||||
|
PLAYER_ACTION stand_action = m_PlayerActions[(int)PLAYER_ACTION_TYPE.ACT_FIGHTSTAND];
|
||||||
|
szAct = EC_Utility.BuildActionName(stand_action, 0);
|
||||||
|
m_pActionController.QueueNonSkillActionWithName(iAction, szAct, 300, false, false, true, false);
|
||||||
|
// if (pRightHandWeapon != null && IsUsingMagicWeapon())
|
||||||
|
// pRightHandWeapon.QueueAction(_GenWeaponActionName(szAct, m_iGender), 300, iAction, false, false, bHideFX, true);
|
||||||
|
|
||||||
|
// if (pRightHandWeapon != null && IsUsingMagicWeapon())
|
||||||
|
// pRightHandWeapon.SetPlaySpeed(vScale);
|
||||||
|
|
||||||
|
attackTime = nTime1 + nTime2;
|
||||||
|
|
||||||
// ==============================
|
// ==============================
|
||||||
// Cập nhật vị trí weapon hanger (vũ khí)
|
// Cập nhật vị trí weapon hanger (vũ khí)
|
||||||
@@ -2601,29 +2582,38 @@ namespace BrewMonster
|
|||||||
|
|
||||||
var atkMan = CECAttacksMan.Instance;
|
var atkMan = CECAttacksMan.Instance;
|
||||||
|
|
||||||
|
// int nExecuteTime = GNET::ElementSkill::GetExecuteTime(idSkill, 0); // 获取技能执行时间 / Get skill execute time
|
||||||
|
int nExecuteTime = ElementSkill.GetExecuteTime((uint)idSkill, 0); // 临时值 / Temporary value
|
||||||
|
|
||||||
if (GetMoveEnv() == (int)MoveEnvironment.MOVEENV_GROUND)
|
if (GetMoveEnv() == (int)MoveEnvironment.MOVEENV_GROUND)
|
||||||
{
|
{
|
||||||
szAct = EC_Utility.BuildActionName(data, weapon_type, "_施放起_");
|
szAct = EC_Utility.BuildActionName(data, weapon_type, "_施放起_");
|
||||||
GetSkillSectionActionName(ref szAct, idSkill, nSection);
|
GetSkillSectionActionName(ref szAct, idSkill, nSection);
|
||||||
|
nTime1 = m_pPlayerCECModel.GetComActTimeSpanByName(szAct); // 获取动作时长 / Get action time span
|
||||||
|
var pAct = m_pPlayerCECModel.GetComActByName(szAct);
|
||||||
|
if (pAct!=null) bInfinite |= pAct.IsLooping();
|
||||||
|
|
||||||
|
string szAct2 = EC_Utility.BuildActionName(data, weapon_type, "_施放落_");
|
||||||
|
GetSkillSectionActionName(ref szAct2, idSkill, nSection);
|
||||||
|
nTime2 = m_pPlayerCECModel.GetComActTimeSpanByName(szAct2);
|
||||||
|
pAct = m_pPlayerCECModel.GetComActByName(szAct2);
|
||||||
|
if (pAct!=null) bInfinite |= pAct.IsLooping();
|
||||||
|
|
||||||
|
// 调整动画速度以匹配攻击速度 / Adjust animation speed to match attack speed
|
||||||
|
if (!bInfinite && nExecuteTime > 0)
|
||||||
|
{
|
||||||
|
float vScale = (nTime1 + nTime2) / (float)nExecuteTime;
|
||||||
|
if (vScale > 0)
|
||||||
|
{
|
||||||
|
m_pPlayerCECModel.SetPlaySpeed(vScale * 1.2f);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!PlaySkillAttackActionWithName(idSkill, szAct, bHideFX, attackEvent))
|
if (!PlaySkillAttackActionWithName(idSkill, szAct, bHideFX, attackEvent))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
QueueSkillAttackActionWithName(idSkill, szAct2, 0, bHideFX);
|
||||||
// nTime1 = m_pPlayerModel.GetComActTimeSpanByName(szAct); // 获取动作时长 / Get action time span
|
|
||||||
// pAct = m_pPlayerModel.GetComActByName(szAct);
|
|
||||||
// if (pAct) bInfinite |= pAct.IsInfinite();
|
|
||||||
nTime1 = 1000; // 临时值 / Temporary value
|
|
||||||
|
|
||||||
szAct = EC_Utility.BuildActionName(data, weapon_type, "_施放落_");
|
|
||||||
GetSkillSectionActionName(ref szAct, idSkill, nSection);
|
|
||||||
QueueSkillAttackActionWithName(idSkill, szAct, 0, bHideFX);
|
|
||||||
|
|
||||||
// nTime2 = m_pPlayerModel.GetComActTimeSpanByName(szAct);
|
|
||||||
// pAct = m_pPlayerModel.GetComActByName(szAct);
|
|
||||||
// if (pAct) bInfinite |= pAct.IsInfinite();
|
|
||||||
nTime2 = 1000; // 临时值 / Temporary value
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -2645,6 +2635,25 @@ namespace BrewMonster
|
|||||||
szActionMiddleName += "_施放起_";
|
szActionMiddleName += "_施放起_";
|
||||||
szAct = EC_Utility.BuildActionName(data, weapon_type, szActionMiddleName);
|
szAct = EC_Utility.BuildActionName(data, weapon_type, szActionMiddleName);
|
||||||
GetSkillSectionActionName(ref szAct, idSkill, nSection);
|
GetSkillSectionActionName(ref szAct, idSkill, nSection);
|
||||||
|
nTime1 = m_pPlayerCECModel.GetComActTimeSpanByName(szAct);
|
||||||
|
var pAct = m_pPlayerCECModel.GetComActByName(szAct);
|
||||||
|
if (pAct!=null) bInfinite |= pAct.IsLooping();
|
||||||
|
|
||||||
|
string szAct2Air = $"{data.ActionPrefix}_{szActionMiddleName}_施法行_{data.action_weapon_suffix[weapon_type].Suffix}";
|
||||||
|
GetSkillSectionActionName(ref szAct2Air, idSkill, nSection);
|
||||||
|
nTime2 = m_pPlayerCECModel.GetComActTimeSpanByName(szAct2Air);
|
||||||
|
pAct = m_pPlayerCECModel.GetComActByName(szAct2Air);
|
||||||
|
if (pAct!=null) bInfinite |= pAct.IsLooping();
|
||||||
|
|
||||||
|
// 调整动画速度以匹配攻击速度 / Adjust animation speed to match attack speed
|
||||||
|
if (!bInfinite && nExecuteTime > 0)
|
||||||
|
{
|
||||||
|
float vScale = (nTime1 + nTime2) / (float)nExecuteTime;
|
||||||
|
if (vScale > 0)
|
||||||
|
{
|
||||||
|
m_pPlayerCECModel.SetPlaySpeed(vScale * 1.2f);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!PlaySkillAttackActionWithName(idSkill, szAct, bHideFX, attackEvent))
|
if (!PlaySkillAttackActionWithName(idSkill, szAct, bHideFX, attackEvent))
|
||||||
{
|
{
|
||||||
@@ -2654,39 +2663,15 @@ namespace BrewMonster
|
|||||||
// if (pRightHandWeapon && IsUsingMagicWeapon())
|
// if (pRightHandWeapon && IsUsingMagicWeapon())
|
||||||
// pRightHandWeapon.PlayActionByName(_GenWeaponActionName(szAct, m_iGender), 1.0f, true, 200, true, ACT_CASTSKILL, bHideFX);
|
// pRightHandWeapon.PlayActionByName(_GenWeaponActionName(szAct, m_iGender), 1.0f, true, 200, true, ACT_CASTSKILL, bHideFX);
|
||||||
|
|
||||||
// nTime1 = m_pPlayerModel.GetComActTimeSpanByName(szAct);
|
QueueSkillAttackActionWithName(idSkill, szAct2Air, 0, bHideFX);
|
||||||
// pAct = m_pPlayerModel.GetComActByName(szAct);
|
|
||||||
// if (pAct) bInfinite |= pAct.IsInfinite();
|
|
||||||
nTime1 = 1000; // 临时值 / Temporary value
|
|
||||||
|
|
||||||
szAct = $"{data.ActionPrefix}_{szActionMiddleName}_施法行_{data.action_weapon_suffix[weapon_type].Suffix}";
|
|
||||||
GetSkillSectionActionName(ref szAct, idSkill, nSection);
|
|
||||||
QueueSkillAttackActionWithName(idSkill, szAct, 0, bHideFX);
|
|
||||||
|
|
||||||
// if (pRightHandWeapon && IsUsingMagicWeapon())
|
// if (pRightHandWeapon && IsUsingMagicWeapon())
|
||||||
// pRightHandWeapon.QueueAction(_GenWeaponActionName(szAct, m_iGender), 0, ACT_CASTSKILL, false, false, bHideFX);
|
// pRightHandWeapon.QueueAction(_GenWeaponActionName(szAct, m_iGender), 0, ACT_CASTSKILL, false, false, bHideFX);
|
||||||
|
|
||||||
// nTime2 = m_pPlayerModel.GetComActTimeSpanByName(szAct);
|
|
||||||
// pAct = m_pPlayerModel.GetComActByName(szAct);
|
|
||||||
// if (pAct) bInfinite |= pAct.IsInfinite();
|
|
||||||
nTime2 = 1000; // 临时值 / Temporary value
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// int nExecuteTime = GNET::ElementSkill::GetExecuteTime(idSkill, 0); // 获取技能执行时间 / Get skill execute time
|
|
||||||
int nExecuteTime = 2000; // 临时值 / Temporary value
|
|
||||||
|
|
||||||
// 调整动画速度以匹配攻击速度 / Adjust animation speed to match attack speed
|
// 调整动画速度以匹配攻击速度 / Adjust animation speed to match attack speed
|
||||||
if (!bInfinite)
|
if (!bInfinite)
|
||||||
{
|
{
|
||||||
if (nExecuteTime > 0)
|
|
||||||
{
|
|
||||||
float vScale = (nTime1 + nTime2) / (float)nExecuteTime;
|
|
||||||
// m_pPlayerModel.SetPlaySpeed(vScale * 1.2f);
|
|
||||||
|
|
||||||
// if (pRightHandWeapon && IsUsingMagicWeapon())
|
|
||||||
// pRightHandWeapon.SetPlaySpeed(vScale * 1.2f);
|
|
||||||
}
|
|
||||||
|
|
||||||
piAttackTime = nTime1 + nTime2;
|
piAttackTime = nTime1 + nTime2;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -4091,7 +4076,8 @@ namespace BrewMonster
|
|||||||
public bool IsLoop;
|
public bool IsLoop;
|
||||||
public CECAttackEvent AttackEvent;
|
public CECAttackEvent AttackEvent;
|
||||||
public int Rank;
|
public int Rank;
|
||||||
public PlayActionEvent(string animationName, int iTransTime, bool isForceStopPrevious = false, CECAttackEvent attackEvent = null, bool isLoop = false)
|
public float PlaySpeed;
|
||||||
|
public PlayActionEvent(string animationName, int iTransTime, bool isForceStopPrevious = false, CECAttackEvent attackEvent = null, bool isLoop = false, float playSpeed = 1.0f)
|
||||||
{
|
{
|
||||||
this.ChannelAct = null;
|
this.ChannelAct = null;
|
||||||
this.AnimationName = animationName;
|
this.AnimationName = animationName;
|
||||||
@@ -4100,8 +4086,9 @@ namespace BrewMonster
|
|||||||
AttackEvent = attackEvent;
|
AttackEvent = attackEvent;
|
||||||
IsLoop = isLoop;
|
IsLoop = isLoop;
|
||||||
Rank = 0;
|
Rank = 0;
|
||||||
|
PlaySpeed = playSpeed;
|
||||||
}
|
}
|
||||||
public PlayActionEvent(ref ChannelAct channelAct, string animationName, int iTransTime, bool isForceStopPrevious = false, CECAttackEvent attackEvent = null, bool isLoop = false, int rank = 0)
|
public PlayActionEvent(ref ChannelAct channelAct, string animationName, int iTransTime, bool isForceStopPrevious = false, CECAttackEvent attackEvent = null, bool isLoop = false, int rank = 0, float playSpeed = 1.0f)
|
||||||
{
|
{
|
||||||
this.ChannelAct = channelAct;
|
this.ChannelAct = channelAct;
|
||||||
this.AnimationName = animationName;
|
this.AnimationName = animationName;
|
||||||
@@ -4110,6 +4097,7 @@ namespace BrewMonster
|
|||||||
AttackEvent = attackEvent;
|
AttackEvent = attackEvent;
|
||||||
IsLoop = isLoop;
|
IsLoop = isLoop;
|
||||||
Rank = rank;
|
Rank = rank;
|
||||||
|
PlaySpeed = playSpeed;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public struct PLAYER_ACTION
|
public struct PLAYER_ACTION
|
||||||
|
|||||||
@@ -359,7 +359,7 @@ public class A3DCombActDynData
|
|||||||
// if (!m_bNoFx)
|
// if (!m_bNoFx)
|
||||||
// TriggerSFxFromEventList();
|
// TriggerSFxFromEventList();
|
||||||
Resume();
|
Resume();
|
||||||
UpdateAct(0);
|
UpdateAct(0, m_pECModel.GetPlaySpeed());
|
||||||
if(true /*!m_bNoFx*/)
|
if(true /*!m_bNoFx*/)
|
||||||
{
|
{
|
||||||
LoadFXFromEventList();
|
LoadFXFromEventList();
|
||||||
@@ -499,6 +499,13 @@ public class A3DCombActDynData
|
|||||||
public void Stop(bool bStopAct, bool bForceStopFx = false )
|
public void Stop(bool bStopAct, bool bForceStopFx = false )
|
||||||
{
|
{
|
||||||
RemoveAllActiveFx();
|
RemoveAllActiveFx();
|
||||||
|
if (ActiveAttackEvent != null)
|
||||||
|
{
|
||||||
|
Debug.Log($"[Nam Debug]Stop: ActiveAttackEvent.m_bSignaled = true, Action name: {m_pAct.m_strName}");
|
||||||
|
ActiveAttackEvent.m_bSignaled = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// FlushDamageInfo();
|
// FlushDamageInfo();
|
||||||
|
|
||||||
// ClearParentInfo();
|
// ClearParentInfo();
|
||||||
@@ -530,11 +537,9 @@ public class A3DCombActDynData
|
|||||||
// if (pChannel)
|
// if (pChannel)
|
||||||
// pChannel->StopAction(m_pAct->GetRank(m_nChannel));
|
// pChannel->StopAction(m_pAct->GetRank(m_nChannel));
|
||||||
}
|
}
|
||||||
public void UpdateAct(uint dwDeltaTime)
|
public void UpdateAct(uint dwDeltaTime, float fPlaySpeed = 1f)
|
||||||
{
|
{
|
||||||
m_dwTimeSpan += (int)dwDeltaTime;
|
m_dwTimeSpan += (int)dwDeltaTime;
|
||||||
if (m_pECModel.IsActionStopped())
|
|
||||||
return;
|
|
||||||
|
|
||||||
if(true/*!m_bNoFx*/)
|
if(true/*!m_bNoFx*/)
|
||||||
UpdateEvent((uint)m_dwTimeSpan, 0);
|
UpdateEvent((uint)m_dwTimeSpan, 0);
|
||||||
@@ -581,7 +586,7 @@ public class A3DCombActDynData
|
|||||||
{
|
{
|
||||||
m_nCurActLoop = 0;
|
m_nCurActLoop = 0;
|
||||||
m_nCurActIndex++;
|
m_nCurActIndex++;
|
||||||
EventBus.PublishChannel(m_pECModel.GetId(), new PlayActionEvent( pNext.m_strName, m_nTransTime, false, ActiveAttackEvent, pNext.CalcLoopNum()==-1 && pNext.GetTimeSpan() > 10));
|
EventBus.PublishChannel(m_pECModel.GetId(), new PlayActionEvent( pNext.m_strName, m_nTransTime, false, null, pNext.CalcLoopNum()==-1 && pNext.GetTimeSpan() > 10, fPlaySpeed));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -629,19 +634,7 @@ public class A3DCombActDynData
|
|||||||
}
|
}
|
||||||
public bool IsActionStopped()
|
public bool IsActionStopped()
|
||||||
{
|
{
|
||||||
if(m_pAct.IsLooping())
|
return m_pAct.m_ActLst.Count == 0 || (m_pAct.m_nLoops != -1 && m_nCurLoop >= m_pAct.m_nLoops);
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if(m_nCurLoop >= m_pAct.m_nLoops)
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
if(m_pAct.m_ActLst.Count == 0)
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
void LoopCurAct(ACTION_INFO pCur, uint dwDeltaTime)
|
void LoopCurAct(ACTION_INFO pCur, uint dwDeltaTime)
|
||||||
{
|
{
|
||||||
@@ -650,7 +643,6 @@ public class A3DCombActDynData
|
|||||||
void LoopNext(uint dwDeltaTime)
|
void LoopNext(uint dwDeltaTime)
|
||||||
{
|
{
|
||||||
m_nCurLoop++;
|
m_nCurLoop++;
|
||||||
|
|
||||||
if (!IsActionStopped())
|
if (!IsActionStopped())
|
||||||
{
|
{
|
||||||
RemoveAllActiveFx();
|
RemoveAllActiveFx();
|
||||||
@@ -1118,6 +1110,7 @@ public class CECModel
|
|||||||
private Transform m_transform;
|
private Transform m_transform;
|
||||||
private bool m_bAbsTrack = false;
|
private bool m_bAbsTrack = false;
|
||||||
private bool m_bFirstActPlayed = false;
|
private bool m_bFirstActPlayed = false;
|
||||||
|
private float m_fPlaySpeed = 1.0f;
|
||||||
public bool InheritParentId() => m_bInheritParentId;
|
public bool InheritParentId() => m_bInheritParentId;
|
||||||
public void SetId(int nId) => m_nId = nId;
|
public void SetId(int nId) => m_nId = nId;
|
||||||
public int GetId() => m_nId;
|
public int GetId() => m_nId;
|
||||||
@@ -1507,13 +1500,34 @@ public class CECModel
|
|||||||
return m_pMapModel.m_ActionMap.TryGetValue(szActName, out A3DCombinedAction combinedAction) ? combinedAction : null;
|
return m_pMapModel.m_ActionMap.TryGetValue(szActName, out A3DCombinedAction combinedAction) ? combinedAction : null;
|
||||||
}
|
}
|
||||||
//Final trigger function
|
//Final trigger function
|
||||||
|
public int GetComActTimeSpanByName(string szActName)
|
||||||
|
{
|
||||||
|
A3DCombinedAction combinedAction = GetComActByName(szActName);
|
||||||
|
if (combinedAction == null || combinedAction.m_ActLst == null || combinedAction.m_ActLst.Count == 0)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
int totalMs = 0;
|
||||||
|
foreach (var actInfo in combinedAction.m_ActLst)
|
||||||
|
{
|
||||||
|
if (actInfo == null || string.IsNullOrEmpty(actInfo.m_strName))
|
||||||
|
continue;
|
||||||
|
AnimationClip clip = GetAnimationClip(actInfo.m_strName);
|
||||||
|
if (clip != null)
|
||||||
|
totalMs += Mathf.Max(1, Mathf.RoundToInt(clip.length * 1000f));
|
||||||
|
}
|
||||||
|
return totalMs;
|
||||||
|
}
|
||||||
|
public void SetPlaySpeed(float vScale)
|
||||||
|
{
|
||||||
|
m_fPlaySpeed = vScale;
|
||||||
|
}
|
||||||
|
public float GetPlaySpeed() => m_fPlaySpeed;
|
||||||
public bool QueueAction(int nChannel, string szActName, int nTransTime, uint dwUserData, bool bForceStopPrevAct, bool bCheckTailDup, bool bNoFx, bool bResetSpeed, bool bResetActFlag, CECAttackEvent attackEvent=null, uint dwNewFlagMode=0){
|
public bool QueueAction(int nChannel, string szActName, int nTransTime, uint dwUserData, bool bForceStopPrevAct, bool bCheckTailDup, bool bNoFx, bool bResetSpeed, bool bResetActFlag, CECAttackEvent attackEvent=null, uint dwNewFlagMode=0){
|
||||||
if(szActName == null || szActName == string.Empty)
|
if(szActName == null || szActName == string.Empty)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
A3DCombinedAction pComAct = GetComActByName(szActName);
|
A3DCombinedAction pComAct = GetComActByName(szActName);
|
||||||
|
|
||||||
if (pComAct == null)
|
if (pComAct == null)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@@ -1586,7 +1600,7 @@ public class CECModel
|
|||||||
}
|
}
|
||||||
public bool Tick(uint dwDeltaTime)
|
public bool Tick(uint dwDeltaTime)
|
||||||
{
|
{
|
||||||
UpdateChannelActs(dwDeltaTime);
|
UpdateChannelActs((uint)(dwDeltaTime * m_fPlaySpeed));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
void UpdateChannelActs(uint dwUpdateTime)
|
void UpdateChannelActs(uint dwUpdateTime)
|
||||||
@@ -1606,13 +1620,11 @@ public class CECModel
|
|||||||
bActFinished = node.m_pActive.IsActionStopped();
|
bActFinished = node.m_pActive.IsActionStopped();
|
||||||
else
|
else
|
||||||
bActFinished = node.m_pActive.IsActionStopped();
|
bActFinished = node.m_pActive.IsActionStopped();
|
||||||
|
|
||||||
if (bActFinished)
|
if (bActFinished)
|
||||||
{
|
{
|
||||||
if (node.m_dwFlagMode != COMACT_FLAG_MODE_NONE && node.m_pActFlag)
|
if (node.m_dwFlagMode != COMACT_FLAG_MODE_NONE && node.m_pActFlag)
|
||||||
{
|
{
|
||||||
node.m_pActFlag = true;
|
node.m_pActFlag = true;
|
||||||
|
|
||||||
if (node.m_dwFlagMode != COMACT_FLAG_MODE_ONCE_MULTIIGNOREGFX)
|
if (node.m_dwFlagMode != COMACT_FLAG_MODE_ONCE_MULTIIGNOREGFX)
|
||||||
node.m_dwFlagMode = (int)COMACT_FLAG_MODE_NONE;
|
node.m_dwFlagMode = (int)COMACT_FLAG_MODE_NONE;
|
||||||
|
|
||||||
@@ -1621,14 +1633,15 @@ public class CECModel
|
|||||||
if (node.m_QueuedActs.Count > 0)
|
if (node.m_QueuedActs.Count > 0)
|
||||||
{
|
{
|
||||||
A3DCombActDynData pNext = node.m_QueuedActs[0];
|
A3DCombActDynData pNext = node.m_QueuedActs[0];
|
||||||
|
|
||||||
if (pNext.GetStopPrevAct())
|
if (pNext.GetStopPrevAct())
|
||||||
{
|
{
|
||||||
node.m_pActive.Stop(true);
|
node.m_pActive.Stop(true);
|
||||||
//StopChildrenAct();
|
//StopChildrenAct();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
node.m_pActive.Stop(false);
|
node.m_pActive.Stop(false);
|
||||||
|
}
|
||||||
|
|
||||||
// script
|
// script
|
||||||
//m_pMapModel->OnScriptPlayAction(this, i, pNext->GetComAct()->GetName());
|
//m_pMapModel->OnScriptPlayAction(this, i, pNext->GetComAct()->GetName());
|
||||||
@@ -1641,7 +1654,7 @@ public class CECModel
|
|||||||
node.m_pActive = null;
|
node.m_pActive = null;
|
||||||
node.m_pActive = pNext;
|
node.m_pActive = pNext;
|
||||||
node.m_pActive.Play(i, 1f, node.m_pActive.GetTransTime(), 0/**m_EventMasks[i]*/, true, m_bAbsTrack, pNext.GetNoFxFlag());
|
node.m_pActive.Play(i, 1f, node.m_pActive.GetTransTime(), 0/**m_EventMasks[i]*/, true, m_bAbsTrack, pNext.GetNoFxFlag());
|
||||||
//pNext.UpdateAct(dwUpdateTime);
|
pNext.UpdateAct(dwUpdateTime, m_fPlaySpeed);
|
||||||
node.m_QueuedActs.RemoveAt(0);
|
node.m_QueuedActs.RemoveAt(0);
|
||||||
m_bAbsTrack = false;
|
m_bAbsTrack = false;
|
||||||
}
|
}
|
||||||
@@ -1653,7 +1666,7 @@ public class CECModel
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
node.m_pActive.UpdateAct(dwUpdateTime);
|
node.m_pActive.UpdateAct(dwUpdateTime, m_fPlaySpeed);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -303,7 +303,7 @@ namespace BrewMonster
|
|||||||
}
|
}
|
||||||
|
|
||||||
int iTransTime = 0;
|
int iTransTime = 0;
|
||||||
EventBus.PublishChannel(m_pPlayer.GetPlayerInfo().cid, new PlayActionEvent(szActName,iTransTime));
|
//EventBus.PublishChannel(m_pPlayer.GetPlayerInfo().cid, new PlayActionEvent(szActName,iTransTime));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
using System;
|
|
||||||
using Animancer;
|
using Animancer;
|
||||||
using BrewMonster;
|
using BrewMonster;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
@@ -12,10 +11,10 @@ namespace BrewMonster
|
|||||||
public string AnimationName;
|
public string AnimationName;
|
||||||
public bool IsForceStopPrevious;
|
public bool IsForceStopPrevious;
|
||||||
public int ITransTime;
|
public int ITransTime;
|
||||||
public CECAttackEvent AttackEvent;
|
|
||||||
public bool IsLoop;
|
public bool IsLoop;
|
||||||
public ChannelAct ChannelAct;
|
public ChannelAct ChannelAct;
|
||||||
public int Rank;
|
public int Rank;
|
||||||
|
public float PlaySpeed;
|
||||||
}
|
}
|
||||||
public class PlayerVisual : MonoBehaviour
|
public class PlayerVisual : MonoBehaviour
|
||||||
{
|
{
|
||||||
@@ -26,7 +25,6 @@ namespace BrewMonster
|
|||||||
[SerializeField] private AnimancerState _currentState;
|
[SerializeField] private AnimancerState _currentState;
|
||||||
[SerializeField] private Queue<AnimationQueue> _animationQueue = new Queue<AnimationQueue>();
|
[SerializeField] private Queue<AnimationQueue> _animationQueue = new Queue<AnimationQueue>();
|
||||||
[SerializeField] private List<string> _animationList = new List<string>();
|
[SerializeField] private List<string> _animationList = new List<string>();
|
||||||
[SerializeField] private bool isHit;
|
|
||||||
[SerializeField] private int id;
|
[SerializeField] private int id;
|
||||||
[SerializeField] private bool isDebug;
|
[SerializeField] private bool isDebug;
|
||||||
[SerializeField] private bool debugNamePlateBounds;
|
[SerializeField] private bool debugNamePlateBounds;
|
||||||
@@ -34,7 +32,6 @@ namespace BrewMonster
|
|||||||
|
|
||||||
private const float FadeTime = 100;
|
private const float FadeTime = 100;
|
||||||
private const FadeMode FadeMode = Animancer.FadeMode.FixedDuration;
|
private const FadeMode FadeMode = Animancer.FadeMode.FixedDuration;
|
||||||
QueueActionEvent queueActionEvent;
|
|
||||||
private string previousAnimationName;
|
private string previousAnimationName;
|
||||||
private void PlayActionEventHandler(PlayActionEvent @event)
|
private void PlayActionEventHandler(PlayActionEvent @event)
|
||||||
{
|
{
|
||||||
@@ -56,24 +53,25 @@ namespace BrewMonster
|
|||||||
{
|
{
|
||||||
AnimationName = @event.AnimationName,
|
AnimationName = @event.AnimationName,
|
||||||
IsForceStopPrevious = @event.IsForceStopPrevious,
|
IsForceStopPrevious = @event.IsForceStopPrevious,
|
||||||
AttackEvent = @event.AttackEvent,
|
ITransTime = @event.ITransTime,
|
||||||
ChannelAct = @event.ChannelAct,
|
ChannelAct = @event.ChannelAct,
|
||||||
Rank = @event.Rank
|
Rank = @event.Rank,
|
||||||
|
PlaySpeed = @event.PlaySpeed
|
||||||
});
|
});
|
||||||
_animationList = _animationQueue.Select(q => q.AnimationName).ToList();
|
_animationList = _animationQueue.Select(q => q.AnimationName).ToList();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
previousAnimationName = @event.AnimationName;
|
previousAnimationName = @event.AnimationName;
|
||||||
InternalPlayAnimation(@event.AnimationName, @event.ITransTime, FadeMode);
|
InternalPlayAnimation(@event.AnimationName, @event.ITransTime, FadeMode, @event.PlaySpeed);
|
||||||
ApplyAnimationEndCallbacks(@event.AttackEvent, @event.ChannelAct, @event.Rank, @event.AnimationName, @event.IsLoop);
|
ApplyAnimationEndCallbacks(@event.AnimationName, @event.IsLoop);
|
||||||
}
|
}
|
||||||
public void InitPlayerEventDoneHandler()
|
public void InitPlayerEventDoneHandler()
|
||||||
{
|
{
|
||||||
namedAnimancer = GetComponentInChildren<NamedAnimancerComponent>();
|
namedAnimancer = GetComponentInChildren<NamedAnimancerComponent>();
|
||||||
if (namedAnimancer == null)
|
if (namedAnimancer == null)
|
||||||
{
|
{
|
||||||
BrewMonster.BMLogger.LogWarning("InitPlayerEventDoneHandler animancer == null");
|
BMLogger.LogWarning("InitPlayerEventDoneHandler animancer == null");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var player = GetComponentInParent<CECPlayer>();
|
var player = GetComponentInParent<CECPlayer>();
|
||||||
@@ -89,7 +87,6 @@ namespace BrewMonster
|
|||||||
_playerInfo = player.GetPlayInfo();
|
_playerInfo = player.GetPlayInfo();
|
||||||
id = _playerInfo.cid;
|
id = _playerInfo.cid;
|
||||||
EventBus.SubscribeChannel<PlayActionEvent>(_playerInfo.cid, PlayActionEventHandler);
|
EventBus.SubscribeChannel<PlayActionEvent>(_playerInfo.cid, PlayActionEventHandler);
|
||||||
EventBus.SubscribeChannelClass<QueueActionEvent>(_playerInfo.cid, QueueActionEventHandler);
|
|
||||||
EventBus.SubscribeChannel<ClearComActFlagAllRankNodesEvent>(_playerInfo.cid, ClearComActFlagAllRankNodesEventHandler);
|
EventBus.SubscribeChannel<ClearComActFlagAllRankNodesEvent>(_playerInfo.cid, ClearComActFlagAllRankNodesEventHandler);
|
||||||
_eventBusSubscribed = true;
|
_eventBusSubscribed = true;
|
||||||
}
|
}
|
||||||
@@ -102,7 +99,6 @@ namespace BrewMonster
|
|||||||
if (!_eventBusSubscribed)
|
if (!_eventBusSubscribed)
|
||||||
return;
|
return;
|
||||||
EventBus.UnsubscribeChannel<PlayActionEvent>(_playerInfo.cid, PlayActionEventHandler);
|
EventBus.UnsubscribeChannel<PlayActionEvent>(_playerInfo.cid, PlayActionEventHandler);
|
||||||
EventBus.UnsubscribeChannelClass<QueueActionEvent>(_playerInfo.cid, QueueActionEventHandler);
|
|
||||||
EventBus.UnsubscribeChannel<ClearComActFlagAllRankNodesEvent>(_playerInfo.cid, ClearComActFlagAllRankNodesEventHandler);
|
EventBus.UnsubscribeChannel<ClearComActFlagAllRankNodesEvent>(_playerInfo.cid, ClearComActFlagAllRankNodesEventHandler);
|
||||||
_eventBusSubscribed = false;
|
_eventBusSubscribed = false;
|
||||||
}
|
}
|
||||||
@@ -131,54 +127,14 @@ namespace BrewMonster
|
|||||||
{
|
{
|
||||||
_animationQueue.Clear();
|
_animationQueue.Clear();
|
||||||
_animationList = _animationQueue.Select(q => q.AnimationName).ToList();
|
_animationList = _animationQueue.Select(q => q.AnimationName).ToList();
|
||||||
if (isHit)
|
|
||||||
{
|
|
||||||
ApplyDamage();
|
|
||||||
}
|
|
||||||
//todo: this is dummy to force change to idle state
|
//todo: this is dummy to force change to idle state
|
||||||
// EventBus.PublishChannel(_playerInfo.cid, new PlayActionEvent("站立_通用"));
|
// EventBus.PublishChannel(_playerInfo.cid, new PlayActionEvent("站立_通用"));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void QueueActionEventHandler(QueueActionEvent @event)
|
|
||||||
{
|
|
||||||
if (!EnqueueAnimation(@event))
|
|
||||||
{
|
|
||||||
BMLogger.LogError("HoangDev : EnqueueAnimation Failed");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
private void Update()
|
private void Update()
|
||||||
{
|
{
|
||||||
PlayNext();
|
PlayNext();
|
||||||
}
|
}
|
||||||
public bool EnqueueAnimation(QueueActionEvent @event)
|
|
||||||
{
|
|
||||||
if (namedAnimancer == null)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if(previousAnimationName == @event.AnimationName)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
previousAnimationName = @event.AnimationName;
|
|
||||||
_animationQueue.Enqueue(new AnimationQueue
|
|
||||||
{
|
|
||||||
AnimationName = @event.AnimationName,
|
|
||||||
IsForceStopPrevious = @event.IsForceStopPrevious,
|
|
||||||
ITransTime = @event.ITransTime,
|
|
||||||
AttackEvent = @event.AttackEvent,
|
|
||||||
IsLoop = @event.IsLoop,
|
|
||||||
ChannelAct = @event.ChannelAct,
|
|
||||||
Rank = @event.Rank
|
|
||||||
});
|
|
||||||
_animationList = _animationQueue.Select(q => q.AnimationName).ToList();
|
|
||||||
if (!isHit)
|
|
||||||
{
|
|
||||||
queueActionEvent = @event;
|
|
||||||
isHit = @event.IsHitAnim;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This function is used to enqueue an animation for looping when the animancer is not set to looping
|
/// This function is used to enqueue an animation for looping when the animancer is not set to looping
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -199,7 +155,6 @@ namespace BrewMonster
|
|||||||
{
|
{
|
||||||
AnimationName = animationName,
|
AnimationName = animationName,
|
||||||
IsForceStopPrevious = false,
|
IsForceStopPrevious = false,
|
||||||
AttackEvent = null,
|
|
||||||
IsLoop = true
|
IsLoop = true
|
||||||
});
|
});
|
||||||
_animationList = _animationQueue.Select(q => q.AnimationName).ToList();
|
_animationList = _animationQueue.Select(q => q.AnimationName).ToList();
|
||||||
@@ -219,45 +174,24 @@ namespace BrewMonster
|
|||||||
_currentState = null;
|
_currentState = null;
|
||||||
}
|
}
|
||||||
if (_currentState != null && _currentState.NormalizedTime < 1f) return;
|
if (_currentState != null && _currentState.NormalizedTime < 1f) return;
|
||||||
if (isHit)// have it relative to check _currentState == null?
|
|
||||||
{
|
|
||||||
ApplyDamage();
|
|
||||||
}
|
|
||||||
var animationQueue = _animationQueue.Dequeue();
|
var animationQueue = _animationQueue.Dequeue();
|
||||||
_animationList = _animationQueue.Select(q => q.AnimationName).ToList();
|
_animationList = _animationQueue.Select(q => q.AnimationName).ToList();
|
||||||
previousAnimationName = animationQueue.AnimationName;
|
previousAnimationName = animationQueue.AnimationName;
|
||||||
InternalPlayAnimation(animationQueue.AnimationName, animationQueue.ITransTime, FadeMode);
|
InternalPlayAnimation(animationQueue.AnimationName, animationQueue.ITransTime, FadeMode, animationQueue.PlaySpeed);
|
||||||
ApplyAnimationEndCallbacks(animationQueue.AttackEvent, animationQueue.ChannelAct, animationQueue.Rank, animationQueue.AnimationName,animationQueue.IsLoop);
|
ApplyAnimationEndCallbacks(animationQueue.AnimationName, animationQueue.IsLoop);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ApplyAnimationEndCallbacks(CECAttackEvent attackEvent, ChannelAct channelAct, int rank, string animationName, bool isLoop)
|
private void ApplyAnimationEndCallbacks( string animationName, bool isLoop)
|
||||||
{
|
{
|
||||||
if (_currentState == null) return;
|
if (_currentState == null) return;
|
||||||
_currentState.Events.OnEnd = () =>
|
_currentState.Events.OnEnd = () =>
|
||||||
{
|
{
|
||||||
if (attackEvent != null)
|
|
||||||
attackEvent.m_bSignaled = true;
|
|
||||||
if(isLoop)
|
if(isLoop)
|
||||||
{
|
{
|
||||||
EnqueueAnimationForLooping(animationName);
|
EnqueueAnimationForLooping(animationName);
|
||||||
}
|
}
|
||||||
if (channelAct == null || string.IsNullOrEmpty(animationName))
|
|
||||||
return;
|
|
||||||
var node = channelAct.GetNodeByRank((byte)rank);
|
|
||||||
node?.m_pActive?.m_ActionNames?.Remove(animationName);
|
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
void ApplyDamage()
|
|
||||||
{
|
|
||||||
if (queueActionEvent == null)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
isHit = false;
|
|
||||||
queueActionEvent.SetFlag(true, queueActionEvent.AttackEvent);
|
|
||||||
queueActionEvent = null;
|
|
||||||
}
|
|
||||||
private void OnDestroy()
|
private void OnDestroy()
|
||||||
{
|
{
|
||||||
UnregisterPlayerEventHandlers();
|
UnregisterPlayerEventHandlers();
|
||||||
@@ -281,7 +215,7 @@ namespace BrewMonster
|
|||||||
/// <param name="animationName"></param>
|
/// <param name="animationName"></param>
|
||||||
/// <param name="duration"></param>
|
/// <param name="duration"></param>
|
||||||
/// <param name="fadeMode"></param>
|
/// <param name="fadeMode"></param>
|
||||||
private void InternalPlayAnimation(string animationName, float duration = FadeTime, FadeMode fadeMode = FadeMode)
|
private void InternalPlayAnimation(string animationName, float duration = FadeTime, FadeMode fadeMode = FadeMode, float playSpeed = 1.0f)
|
||||||
{
|
{
|
||||||
if (namedAnimancer == null)
|
if (namedAnimancer == null)
|
||||||
{
|
{
|
||||||
@@ -292,6 +226,7 @@ namespace BrewMonster
|
|||||||
{
|
{
|
||||||
_currentState = namedAnimancer.TryPlay(animationName, duration / 1000, fadeMode);
|
_currentState = namedAnimancer.TryPlay(animationName, duration / 1000, fadeMode);
|
||||||
_currentState.Time = 0;
|
_currentState.Time = 0;
|
||||||
|
_currentState.Speed = playSpeed > 0f ? playSpeed : 1.0f;
|
||||||
_currentAnimationName = animationName;
|
_currentAnimationName = animationName;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user