-
Notifications
You must be signed in to change notification settings - Fork 0
/
EnemyStun.cs
36 lines (28 loc) · 996 Bytes
/
EnemyStun.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using BehaviorDesigner.Runtime.Tasks;
using BehaviorDesigner.Runtime;
public class EnemyStun : Action
{
public SharedString thisGameObjName;
private CloseAttackTypeNormalColliderCon closeAttackTypeNormalColliderCon;
public override void OnStart()
{
switch (thisGameObjName.Value)
{
case "CloseAttackEnemy01":
closeAttackTypeNormalColliderCon = GetComponent<CloseAttackTypeNormalColliderCon>();
break;
case "DistanceAttackEnemy01":
break;
case "Boss_01(Clone)":
break;
}
}
public override TaskStatus OnUpdate()
{
if (closeAttackTypeNormalColliderCon.IsAttackedState == CloseAttackTypeNormalColliderCon.CloseAttackEnemy01IsAttacked.stuned) return TaskStatus.Success;
else return TaskStatus.Failure;
}
}