public static void AddAction(PlayerAction pa) { if (NewPlayerActionUI.me == null) { NewPlayerActionUI.me = FindObjectOfType <NewPlayerActionUI> (); } if (NewPlayerActionUI.me.allActions == null) { NewPlayerActionUI.me.allActions = new List <PlayerAction> (); } if (NewPlayerActionUI.me.myActions == null) { NewPlayerActionUI.me.myActions = new List <PlayerAction> (); } NewPlayerActionUI.me.allActions.Add(pa); }
void OnEnable() { NewPlayerActionUI.AddAction(this); }
void Awake() { me = this; }