怪物移动路径偏差
This commit is contained in:
parent
9fb026c006
commit
421a21182d
8
meng_yao/Assets/Prefabs/charatar/enemy/wood_min.meta
Normal file
8
meng_yao/Assets/Prefabs/charatar/enemy/wood_min.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e88163c4404f1834191f2be5891f91c5
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -310,7 +310,7 @@ MonoBehaviour:
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
moveSpeed: 3
|
||||
moveSpeed: 1
|
||||
obj: {fileID: 4703411402842800732}
|
||||
--- !u!114 &4703411402755586929
|
||||
MonoBehaviour:
|
||||
@ -379,7 +379,7 @@ MonoBehaviour:
|
||||
- {fileID: 21300000, guid: 84ea23eac94f8e84bb75e7c77f95447e, type: 3}
|
||||
- {fileID: 21300000, guid: cab320b3f45281448944a1a9c46cc762, type: 3}
|
||||
- {fileID: 21300000, guid: 1657ff3f38d87b94586a400f5834025c, type: 3}
|
||||
CharacterAnimationFrameInterval: 12
|
||||
CharacterAnimationFrameInterval: 36
|
||||
- value:
|
||||
- {fileID: 21300000, guid: d0e97f96cf7eb544ab3a5fa66cd90b76, type: 3}
|
||||
- {fileID: 21300000, guid: d5d7283b4ed2eb84d8c769594f12ea17, type: 3}
|
||||
@ -404,7 +404,7 @@ MonoBehaviour:
|
||||
attackClass: {fileID: 0}
|
||||
CurrentIndex: 33
|
||||
enemyId:
|
||||
moveSpeed: 3
|
||||
moveSpeed: 2
|
||||
harmNumber: 0
|
||||
--- !u!210 &6468108308622956862
|
||||
SortingGroup:
|
||||
@ -582,7 +582,7 @@ SpriteRenderer:
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_Sprite: {fileID: 21300000, guid: 72a01706836824e40a2c6e4285bd237f, type: 3}
|
||||
m_Sprite: {fileID: 21300000, guid: 5fdc02cc28955354681ddffb7b09085a, type: 3}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_FlipX: 0
|
||||
m_FlipY: 0
|
||||
|
@ -0,0 +1,12 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!91 &9100000
|
||||
AnimatorController:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Circle
|
||||
serializedVersion: 5
|
||||
m_AnimatorParameters: []
|
||||
m_AnimatorLayers: []
|
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b15d381a90fd76b4f846576b87f621b2
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 9100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
53
meng_yao/Assets/Prefabs/charatar/enemy/wood_min/attack.anim
Normal file
53
meng_yao/Assets/Prefabs/charatar/enemy/wood_min/attack.anim
Normal file
@ -0,0 +1,53 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!74 &7400000
|
||||
AnimationClip:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: attack
|
||||
serializedVersion: 7
|
||||
m_Legacy: 0
|
||||
m_Compressed: 0
|
||||
m_UseHighQualityCurve: 1
|
||||
m_RotationCurves: []
|
||||
m_CompressedRotationCurves: []
|
||||
m_EulerCurves: []
|
||||
m_PositionCurves: []
|
||||
m_ScaleCurves: []
|
||||
m_FloatCurves: []
|
||||
m_PPtrCurves: []
|
||||
m_SampleRate: 60
|
||||
m_WrapMode: 0
|
||||
m_Bounds:
|
||||
m_Center: {x: 0, y: 0, z: 0}
|
||||
m_Extent: {x: 0, y: 0, z: 0}
|
||||
m_ClipBindingConstant:
|
||||
genericBindings: []
|
||||
pptrCurveMapping: []
|
||||
m_AnimationClipSettings:
|
||||
serializedVersion: 2
|
||||
m_AdditiveReferencePoseClip: {fileID: 0}
|
||||
m_AdditiveReferencePoseTime: 0
|
||||
m_StartTime: 0
|
||||
m_StopTime: 1
|
||||
m_OrientationOffsetY: 0
|
||||
m_Level: 0
|
||||
m_CycleOffset: 0
|
||||
m_HasAdditiveReferencePose: 0
|
||||
m_LoopTime: 1
|
||||
m_LoopBlend: 0
|
||||
m_LoopBlendOrientation: 0
|
||||
m_LoopBlendPositionY: 0
|
||||
m_LoopBlendPositionXZ: 0
|
||||
m_KeepOriginalOrientation: 0
|
||||
m_KeepOriginalPositionY: 1
|
||||
m_KeepOriginalPositionXZ: 0
|
||||
m_HeightFromFeet: 0
|
||||
m_Mirror: 0
|
||||
m_EditorCurves: []
|
||||
m_EulerEditorCurves: []
|
||||
m_HasGenericRootTransform: 0
|
||||
m_HasMotionFloatCurves: 0
|
||||
m_Events: []
|
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ebbe18432a6fa5045b5447d875c612a3
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 7400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
53
meng_yao/Assets/Prefabs/charatar/enemy/wood_min/move.anim
Normal file
53
meng_yao/Assets/Prefabs/charatar/enemy/wood_min/move.anim
Normal file
@ -0,0 +1,53 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!74 &7400000
|
||||
AnimationClip:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: move
|
||||
serializedVersion: 7
|
||||
m_Legacy: 0
|
||||
m_Compressed: 0
|
||||
m_UseHighQualityCurve: 1
|
||||
m_RotationCurves: []
|
||||
m_CompressedRotationCurves: []
|
||||
m_EulerCurves: []
|
||||
m_PositionCurves: []
|
||||
m_ScaleCurves: []
|
||||
m_FloatCurves: []
|
||||
m_PPtrCurves: []
|
||||
m_SampleRate: 60
|
||||
m_WrapMode: 0
|
||||
m_Bounds:
|
||||
m_Center: {x: 0, y: 0, z: 0}
|
||||
m_Extent: {x: 0, y: 0, z: 0}
|
||||
m_ClipBindingConstant:
|
||||
genericBindings: []
|
||||
pptrCurveMapping: []
|
||||
m_AnimationClipSettings:
|
||||
serializedVersion: 2
|
||||
m_AdditiveReferencePoseClip: {fileID: 0}
|
||||
m_AdditiveReferencePoseTime: 0
|
||||
m_StartTime: 0
|
||||
m_StopTime: 1
|
||||
m_OrientationOffsetY: 0
|
||||
m_Level: 0
|
||||
m_CycleOffset: 0
|
||||
m_HasAdditiveReferencePose: 0
|
||||
m_LoopTime: 1
|
||||
m_LoopBlend: 0
|
||||
m_LoopBlendOrientation: 0
|
||||
m_LoopBlendPositionY: 0
|
||||
m_LoopBlendPositionXZ: 0
|
||||
m_KeepOriginalOrientation: 0
|
||||
m_KeepOriginalPositionY: 1
|
||||
m_KeepOriginalPositionXZ: 0
|
||||
m_HeightFromFeet: 0
|
||||
m_Mirror: 0
|
||||
m_EditorCurves: []
|
||||
m_EulerEditorCurves: []
|
||||
m_HasGenericRootTransform: 0
|
||||
m_HasMotionFloatCurves: 0
|
||||
m_Events: []
|
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 70024178c962a9e49819f60ea30620ff
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 7400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -313,7 +313,7 @@ SortingGroup:
|
||||
m_Enabled: 1
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 2
|
||||
m_SortingOrder: 3
|
||||
--- !u!114 &8433650274028726420
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -350,6 +350,7 @@ MonoBehaviour:
|
||||
attackClass: {fileID: 7276635428522831207}
|
||||
CurrentIndex: 0
|
||||
enemyId:
|
||||
moveSpeed: 0
|
||||
harmNumber: 0
|
||||
--- !u!61 &-3836672401185760439
|
||||
BoxCollider2D:
|
||||
|
@ -344,7 +344,7 @@ SortingGroup:
|
||||
m_Enabled: 1
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 2
|
||||
m_SortingOrder: 3
|
||||
--- !u!114 &8433650274028726420
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -364,6 +364,7 @@ MonoBehaviour:
|
||||
hp: 100
|
||||
dieIndex: -1
|
||||
Hpfiil: {fileID: 0}
|
||||
HpfiilYello: {fileID: 0}
|
||||
HpTextPrefab: {fileID: 0}
|
||||
_Canvas: {fileID: 0}
|
||||
spriteRenderers: {fileID: 0}
|
||||
@ -380,6 +381,7 @@ MonoBehaviour:
|
||||
attackClass: {fileID: 7276635428522831207}
|
||||
CurrentIndex: 0
|
||||
enemyId:
|
||||
moveSpeed: 0
|
||||
harmNumber: 0
|
||||
--- !u!61 &-3836672401185760439
|
||||
BoxCollider2D:
|
||||
|
@ -210,6 +210,8 @@ MonoBehaviour:
|
||||
bulltes: []
|
||||
animator: {fileID: 0}
|
||||
fireAni: {fileID: 0}
|
||||
BulletStartPos: {fileID: 0}
|
||||
direction: {x: 0, y: 0}
|
||||
--- !u!58 &1338343970434073545
|
||||
CircleCollider2D:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -274,7 +276,7 @@ SortingGroup:
|
||||
m_Enabled: 1
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 2
|
||||
m_SortingOrder: 3
|
||||
--- !u!114 &8433650274028726420
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -294,6 +296,7 @@ MonoBehaviour:
|
||||
hp: 100
|
||||
dieIndex: -1
|
||||
Hpfiil: {fileID: 0}
|
||||
HpfiilYello: {fileID: 0}
|
||||
HpTextPrefab: {fileID: 0}
|
||||
_Canvas: {fileID: 0}
|
||||
spriteRenderers: {fileID: 0}
|
||||
@ -370,6 +373,7 @@ MonoBehaviour:
|
||||
attackClass: {fileID: 7276635428522831207}
|
||||
CurrentIndex: 0
|
||||
enemyId:
|
||||
moveSpeed: 0
|
||||
harmNumber: 0
|
||||
--- !u!61 &-3836672401185760439
|
||||
BoxCollider2D:
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 2b93b1469921dc657aa3546d0c31ace7748aaee0
|
||||
Subproject commit 84ca89c647aa7d6d89be70886b90d983b838e989
|
@ -25,10 +25,17 @@ public class enemy : Role
|
||||
{
|
||||
base.Start();
|
||||
|
||||
// AnimationTree[0].CharacterAnimationFrameInterval =(int)moveSpeed * 4;
|
||||
//
|
||||
|
||||
if (camp == Camp.Enemy)
|
||||
{
|
||||
if (AnimationTree!=null)
|
||||
{
|
||||
AnimationTree[0].CharacterAnimationFrameInterval = (int)(36/moveSpeed) ;
|
||||
|
||||
Debug.Log("改变移动动画");
|
||||
}
|
||||
|
||||
//开始移动
|
||||
Init(InitEnenyData.instance.GetRandomWaypoints());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user