no message
This commit is contained in:
parent
4a5313a9cf
commit
11d617db90
@ -187,16 +187,16 @@ AnimatorStateMachine:
|
||||
m_ChildStates:
|
||||
- serializedVersion: 1
|
||||
m_State: {fileID: 703164551053012985}
|
||||
m_Position: {x: 560, y: 160, z: 0}
|
||||
m_Position: {x: 260, y: 170, z: 0}
|
||||
- serializedVersion: 1
|
||||
m_State: {fileID: 1028912623824696338}
|
||||
m_Position: {x: 260, y: 100, z: 0}
|
||||
m_Position: {x: 260, y: 240, z: 0}
|
||||
- serializedVersion: 1
|
||||
m_State: {fileID: -5615459309368676638}
|
||||
m_Position: {x: 560, y: 90, z: 0}
|
||||
m_Position: {x: 260, y: 90, z: 0}
|
||||
- serializedVersion: 1
|
||||
m_State: {fileID: -4316900719387780663}
|
||||
m_Position: {x: 260, y: 170, z: 0}
|
||||
m_Position: {x: 260, y: 310, z: 0}
|
||||
- serializedVersion: 1
|
||||
m_State: {fileID: -5723871321714695223}
|
||||
m_Position: {x: 704.1478, y: -596.24896, z: 0}
|
||||
|
||||
@ -7,6 +7,7 @@ public class AnimationEntity : MonoBehaviour
|
||||
|
||||
private Animator _animator_entity;
|
||||
private bool _doSomething = false;
|
||||
private bool _isDead = false;
|
||||
|
||||
void Start() {
|
||||
_animator_entity = GetComponentInChildren<Animator>();
|
||||
@ -22,21 +23,28 @@ public class AnimationEntity : MonoBehaviour
|
||||
}
|
||||
|
||||
public void Idle() {
|
||||
_animator_entity.Play("idle", 0, 0f);
|
||||
if(!_isDead) {
|
||||
_animator_entity.Play("idle", 0, 0f);
|
||||
}
|
||||
}
|
||||
|
||||
public void Walk() {
|
||||
_animator_entity.Play("walk", 0, 0f);
|
||||
if(!_isDead) {
|
||||
_animator_entity.Play("walk", 0, 0f);
|
||||
}
|
||||
}
|
||||
|
||||
public void Attack() {
|
||||
_animator_entity.Play("attack", 0, 0f);
|
||||
_doSomething = true;
|
||||
if(!_isDead) {
|
||||
_animator_entity.Play("attack", 0, 0f);
|
||||
_doSomething = true;
|
||||
}
|
||||
}
|
||||
|
||||
public void Die() {
|
||||
_animator_entity.Play("die", 0, 0f);
|
||||
_doSomething = true;
|
||||
_isDead = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user