public AIAction this[BrainState state] { get { return(this.Actions[(int)state]); } set { AIAction action = this.Actions[(int)state]; if (action == value) { return; } this.Actions[(int)state] = value; IBrain brain = this.m_owner.Brain; if (brain == null || brain.State != state || brain.CurrentAction != action) { return; } brain.CurrentAction = (IAIAction)value; } }
public void SetAction(BrainState state, AIAction action) { Actions[(int)state] = action; }