Ejemplo n.º 1
0
        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);
//			}
        }
Ejemplo n.º 2
0
        public static CGME.GameManager GetInstance()
        {
            if (instance == null)
            {
                instance = new GameManager();
            }

            return(instance);
        }
Ejemplo n.º 3
0
        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);
            }
        }
Ejemplo n.º 4
0
        // GET/SET FUNCTIONS ----------------------------------------
        public static CGME.GameManager GetInstance()
        {
            if (instance == null)
                instance = new GameManager();

            return instance;
        }