void Awake() { CGME_Manager = CGME.GameManager.GetInstance(); CGME_Manager.AddEngineListener(this); CGME_Manager.AddActionEventListener(this); if (game_instance == null) { game_instance = FindObjectOfType <CGM.Game>(); } Debug.Log("Adding actions to action library"); foreach (ActionWrapper act in Actions) { cgme_lib.actionLibrary.Add(act.CGME_ActionRoot); } game_instance.Register(null); //,SendMessageOptions.DontRequireReceiver); cam = FindObjectOfType <Camera>(); // foreach (Action act in GetChildrenActions()){ // cgme_lib.actionLibrary.Add (act.CGME_ActionRoot); // } }
public static CGME.GameManager GetInstance() { if (instance == null) { instance = new GameManager(); } return(instance); }
protected void RegisterCards() { //GetComponentsInChildrenO CGM.Card[] children = (CGM.Card[])transform.GetComponentsInChildren <CGM.Card>(); CGME.GameManager manager = CGME.GameManager.GetInstance(); foreach (CGM.Card child in children) { CGME_Deck.AddCard(child.CGME_Card); } }
// GET/SET FUNCTIONS ---------------------------------------- public static CGME.GameManager GetInstance() { if (instance == null) instance = new GameManager(); return instance; }