You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
480 B
29 lines
480 B
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class WorkAction :ActionNode
|
|
{
|
|
public AI_Worker _Worker;
|
|
|
|
|
|
|
|
public override IEnumerator Execute()
|
|
{
|
|
if (_Worker.animator != null)
|
|
{
|
|
|
|
if (_Worker.animator.GetCurrentAnimatorStateInfo(0).IsName("Work2") == false)
|
|
{
|
|
_Worker.animator.CrossFade("Work2", 0f);
|
|
}
|
|
|
|
|
|
}
|
|
|
|
return base.Execute();
|
|
}
|
|
|
|
|
|
}
|