Using Using Using Public Enum
Using Using Using Public Enum
Using Using Using Public Enum
/*!
\file LEF_Node.cs
\author Khan Sweetman
\par All content 2015 DigiPen (USA) Corporation, all rights reserved.
\par Golden Bullet Games
\brief
All behavior tree nodes inherit from here. Child nodes should following the
naming convention:
- DEC_Decorator
- LEF_Leaf
- SEL_Selector
*/
/*******************************************************************************/
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public enum BT_Status
{
Entering,
Running,
Success,
Fail
}
public enum BT_NodeType
{
Leaf,
Decorator,
Selector
}
public class LEF_CopyPasteThisNode : BT_Node
{
//public BT_Node[] Children;
//public string Name = "Node";
//public int CurrIndex = 0;
//public BT_Status CurrStatus = BT_Status.Entering;
//public GameObject Owner;
//public BT_Node Root;
public LEF_CopyPasteThisNode() : base() { }
// First parameter should be owner
// Second parameter should be root
public override void Initialize(object[] objs)
{
base.Initialize(objs);
}
/////////////////////////////////// Per frame Functions ///////////////////////////////////
public override BT_Status Update()
{
return CurrStatus;
}
}
[System.Serializable]
public class BT_Node
{
public string Name = "Node";
[System.NonSerialized] public
[System.NonSerialized] public
[System.NonSerialized] public
[System.NonSerialized] public
[System.NonSerialized] public
[System.NonSerialized] public
[System.NonSerialized] public
BT_Node Root;
int CurrIndex = 0;
BT_Status CurrStatus = BT_Status.Entering;
GameObject Owner;
AI_Base AI;
List<BT_Node> Children = new List<BT_Node>();
BT_NodeType NodeType = BT_NodeType.Leaf;