41 lines
1.1 KiB
C#
41 lines
1.1 KiB
C#
using Beyond;
|
|
using Invector.vCharacterController.AI;
|
|
using Invector.vCharacterController.AI.FSMBehaviour;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
namespace Beyond
|
|
{
|
|
public class KillSpiderStep : MonoBehaviour
|
|
{
|
|
public BaseStepController baseStepController;
|
|
public vControlAIMelee spiderAiController;
|
|
|
|
// Start is called before the first frame update
|
|
private void Start()
|
|
{
|
|
baseStepController.OnStarted += () =>
|
|
{
|
|
EnableSpiderBehaviour();
|
|
};
|
|
|
|
baseStepController.OnCompleted += () =>
|
|
{
|
|
};
|
|
|
|
baseStepController.ConditionsAreMet += () => spiderAiController.isDead;
|
|
}
|
|
|
|
public void EnableSpiderBehaviour()
|
|
{
|
|
spiderAiController.isImmortal = false;
|
|
spiderAiController.GetComponent<vFSMBehaviourController>().enabled = true;
|
|
spiderAiController.GetComponent<vControlAIJump>().JumpOnPlayerNow();
|
|
}
|
|
// Update is called once per frame
|
|
private void Update()
|
|
{
|
|
}
|
|
}
|
|
} |