Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
BattleMuscle
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
czy
BattleMuscle
Commits
3c1a7b98
Commit
3c1a7b98
authored
May 14, 2021
by
czy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加boss动画管理器
parent
062757c0
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
482 additions
and
145 deletions
+482
-145
BattleUI.cs
BattleMuscle/Assets/#A2_Scripts/Battle/UI/BattleUI.cs
+2
-2
Idle.anim
...scle/Assets/Art_Assets/Animation/Animation/Boss/Idle.anim
+1
-1
Running2.anim
.../Assets/Art_Assets/Animation/Animation/Boss/Running2.anim
+8
-1
Running2.controller
..._Assets/Animation/AnimationController/Running2.controller
+183
-57
Level 1.unity
BattleMuscle/Assets/Levels/Level 1.unity
+28
-9
BossAnimationManager.cs
BattleMuscle/Assets/My/Scripts/AI/BossAnimationManager.cs
+50
-0
BossAnimationManager.cs.meta
...eMuscle/Assets/My/Scripts/AI/BossAnimationManager.cs.meta
+11
-0
BossAttack.cs
BattleMuscle/Assets/My/Scripts/AI/BossAttack.cs
+1
-1
BossMove.cs
BattleMuscle/Assets/My/Scripts/AI/BossMove.cs
+196
-72
PlayerMove.cs
BattleMuscle/Assets/My/Scripts/Player/PlayerMove.cs
+2
-2
No files found.
BattleMuscle/Assets/#A2_Scripts/Battle/UI/BattleUI.cs
View file @
3c1a7b98
...
...
@@ -368,7 +368,7 @@ public class BattleUI : MonoBehaviour
//设置战斗UI状态
public
void
SetBattleObjState
(
bool
bool_
)
{
print
(
"显示m_battleObj:"
+
bool_
);
//
print("显示m_battleObj:"+bool_);
m_battleObj
.
SetActive
(
bool_
);
//m_successResultObj.SetActive(bool_);
//m_successResultMaskObj.SetActive(!bool_);
...
...
@@ -502,7 +502,7 @@ public class BattleUI : MonoBehaviour
}
public
void
UpdateScore2
(
string
name
,
string
text
)
{
print
(
"name:"
+
name
+
",text"
+
text
);
//
print("name:" + name + ",text" + text);
switch
(
name
)
{
case
"Player"
:
...
...
BattleMuscle/Assets/Art_Assets/Animation/Animation/Boss/Idle.anim
View file @
3c1a7b98
...
...
@@ -36,7 +36,7 @@ AnimationClip:
m_Level
:
0
m_CycleOffset
:
0
m_HasAdditiveReferencePose
:
0
m_LoopTime
:
1
m_LoopTime
:
0
m_LoopBlend
:
0
m_LoopBlendOrientation
:
0
m_LoopBlendPositionY
:
0
...
...
BattleMuscle/Assets/Art_Assets/Animation/Animation/Boss/Running2.anim
View file @
3c1a7b98
...
...
@@ -22354,4 +22354,11 @@ AnimationClip:
script
:
{
fileID
:
0
}
m_HasGenericRootTransform
:
0
m_HasMotionFloatCurves
:
0
m_Events
:
[]
m_Events
:
-
time
:
0
functionName
:
ChangeAttackType
data
:
objectReferenceParameter
:
{
fileID
:
0
}
floatParameter
:
0
intParameter
:
0
messageOptions
:
0
BattleMuscle/Assets/Art_Assets/Animation/AnimationController/Running2.controller
View file @
3c1a7b98
This diff is collapsed.
Click to expand it.
BattleMuscle/Assets/Levels/Level 1.unity
View file @
3c1a7b98
...
...
@@ -262,17 +262,17 @@ PrefabInstance:
- target: {fileID: -4216859302048453862, guid: 092b5adfc35664b43a5e216c3aba0c4d,
type: 3}
propertyPath: m_LocalScale.x
value:
1
value:
0.8
objectReference: {fileID: 0}
- target: {fileID: -4216859302048453862, guid: 092b5adfc35664b43a5e216c3aba0c4d,
type: 3}
propertyPath: m_LocalScale.y
value:
1
value:
0.8
objectReference: {fileID: 0}
- target: {fileID: -4216859302048453862, guid: 092b5adfc35664b43a5e216c3aba0c4d,
type: 3}
propertyPath: m_LocalScale.z
value:
1
value:
0.8
objectReference: {fileID: 0}
- target: {fileID: -927199367670048503, guid: 092b5adfc35664b43a5e216c3aba0c4d,
type: 3}
...
...
@@ -2386,8 +2386,8 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 88224c51f1a97cf40895dff846d2a5b3, type: 3}
m_Name:
m_EditorClassIdentifier:
foodNumber:
2
0
timeSpan:
10
foodNumber:
10
0
timeSpan:
2
foodPoint:
- {fileID: 1752813316}
- {fileID: 1547259537}
...
...
@@ -6945,6 +6945,7 @@ GameObject:
- component: {fileID: 557966604}
- component: {fileID: 557966602}
- component: {fileID: 557966603}
- component: {fileID: 557966605}
m_Layer: 0
m_Name: Boss
m_TagString: Boss
...
...
@@ -7015,7 +7016,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
VSpeed: 10
life: 30
life: 30
0
scale: 1
MinScale: 0.2
targetList:
...
...
@@ -7025,9 +7026,27 @@ MonoBehaviour:
MoveSpeed: 0
BirthplacePos: {fileID: 225105685}
EnemyNumber: 0
Timer1: 0
HurricaneKickDuration: 1.5
CurrentHurricaneKickDuration: 0
HurricaneKickCoolingTime: 5
CurrentHurricaneKickCoolingTime: 0
isDeltaTime: 0
LegSweepDuration: 2
CurrentLegSweepDuration: 0
isDeltaTime2: 0
bossState: 0
--- !u!114 &557966605
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 557966600}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 17ab4b61d0b362349828e661a3b978a3, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!4 &560627449 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 5957448836295836418, guid: 15d49ef1e12d35a46b7c6fb953021b43,
...
...
@@ -18506,8 +18525,8 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 88224c51f1a97cf40895dff846d2a5b3, type: 3}
m_Name:
m_EditorClassIdentifier:
foodNumber:
2
0
timeSpan:
10
foodNumber:
10
0
timeSpan:
2
foodPoint:
- {fileID: 297527856}
- {fileID: 1128247090}
BattleMuscle/Assets/My/Scripts/AI/BossAnimationManager.cs
0 → 100644
View file @
3c1a7b98
using
System.Collections
;
using
System.Collections.Generic
;
using
UnityEngine
;
public
enum
BossAnimationState
{
LegSweep
=
1
,
HurricaneKick
=
2
,
NotAttack
=
3
}
public
class
BossAnimationManager
:
MonoBehaviour
{
private
Animator
animator
;
void
Start
()
{
animator
=
GetComponentInChildren
<
Animator
>();
}
public
void
ChangeAnimatorState
(
BossAnimationState
state
)
{
print
(
gameObject
.
name
+
",ChangeAnimatorState:"
+
state
);
switch
(
state
)
{
case
BossAnimationState
.
LegSweep
:
animator
.
SetBool
(
"HurricaneKick"
,
false
);
animator
.
SetBool
(
"LegSweep"
,
true
);
animator
.
SetFloat
(
"MoveSpeed"
,
0
);
break
;
case
BossAnimationState
.
HurricaneKick
:
animator
.
SetBool
(
"HurricaneKick"
,
true
);
animator
.
SetBool
(
"LegSweep"
,
false
);
animator
.
SetFloat
(
"MoveSpeed"
,
0
)
;
break
;
case
BossAnimationState
.
NotAttack
:
animator
.
SetBool
(
"HurricaneKick"
,
false
);
animator
.
SetBool
(
"LegSweep"
,
false
);
break
;
default
:
animator
.
SetBool
(
"HurricaneKick"
,
false
);
animator
.
SetBool
(
"LegSweep"
,
false
);
Debug
.
LogError
(
state
);
break
;
}
}
}
BattleMuscle/Assets/My/Scripts/AI/BossAnimationManager.cs.meta
0 → 100644
View file @
3c1a7b98
fileFormatVersion: 2
guid: 17ab4b61d0b362349828e661a3b978a3
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
BattleMuscle/Assets/My/Scripts/AI/BossAttack.cs
View file @
3c1a7b98
...
...
@@ -60,7 +60,7 @@ public class BossAttack : MonoBehaviour
public
void
ChangeAttackType
(
int
i
)
{
attackType
=
(
AttackType
)
i
;
//
print("改变boss攻击状态为:"+attackType);
print
(
"改变boss攻击状态为:"
+
attackType
);
}
...
...
BattleMuscle/Assets/My/Scripts/AI/BossMove.cs
View file @
3c1a7b98
This diff is collapsed.
Click to expand it.
BattleMuscle/Assets/My/Scripts/Player/PlayerMove.cs
View file @
3c1a7b98
...
...
@@ -104,10 +104,10 @@ public class PlayerMove : MonoBehaviour
{
if
(
hit
.
gameObject
==
targetWall
)
{
print
(
"Player碰到墙:"
+
scale
);
//
print("Player碰到墙:"+ scale);
if
(
scale
>
1
)
{
print
(
"推墙"
);
//
print("推墙");
hit
.
gameObject
.
GetComponent
<
Rigidbody
>().
AddForce
(
new
Vector3
(
0
,
0
,
100
));
scale
-=
reduceStep
;
ReduceIsPlayChangeModeEffect
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment