Professional Documents
Culture Documents
Data Structure
Data Structure
State:
- Class Patrol:
-Action :
- MoveForward(patrolSpeed)
- LookAt(patrolWaypoints[currentWaypointIndex].position)
- SetAnimator("isPatroling", true)
-Transitions :
- Event : DistanceToPlayer() < attackRange = Transition to
AttackMode
- Class AttackMode:
-Action :
- LookAt(player.playerHealth)
-Transition :
- Event : DistanceToPlayer() > attackRange = Transition to Patrol
- Event : playerHealth > 4970 (71%) = Transition to SpecialAttack
- Event : playerHealth <= 4970 = Transition to ComboAttack
- Event : playerHealth <= 2170 = Transition to LowAttack
- Class SpecialAttack :
- Action :
- playerHealth.TakeDamage(100)
- SetAnimator("SpecialAttack", true)
- Transition :
- Event : DistanceToPlayer() > attackRange = Transition to
AttackMode
- Event : enemyHealht == 0 = Transition to Die
- Class ComboAttack :
- Action :
- playerHealth.TakeDamage(80)
- SetAnimator("ComboAttack", true)
- Transition :
- Event : - Event : DistanceToPlayer() > attackRange = Transition to
AttackMode
- Event : enemyHealht == 0 = Transition to Die
- Class LowAttack :
- Action :
- playerHealth.TakeDamage(60)
- SetAnimator("LowAttack", true)
- Transition :
- Event : - Event : DistanceToPlayer() > attackRange = Transition to
AttackMode
- Event : enemyHealht == 0 = Transition to Die
- Class Die :
Action :
- SetAnimator("Die" true)