Accessing the EmeraldAPI Script
using EmeraldAI;EmeraldComponent = GetComponent<EmeraldSystem>();using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using EmeraldAI;
public class AccessEmeraldExample : MonoBehaviour
{
EmeraldSystem EmeraldComponent;
//Cache the EmeraldSystem component
void Start ()
{
EmeraldComponent = GetComponent<EmeraldSystem>();
}
//Instantly kill the AI this script is assigned to after pressing the H key
void Update()
{
if (Input.GetKeyDown(KeyCode.H))
{
EmeraldAPI.Combat.KillAI(EmeraldComponent);
}
}
}Table of Contents
Last updated