Exemple #1
0
	public cMyGrids	Grids;				// main grids . only one
	
	
	//	private Dictionary<int, AudioChannelBase> channels = new Dictionary<int, AudioChannelBase>();
	
	public void Initial( ){
		if (hadInit)return;
		
		hadInit = true;
		//this.GetAudioClipFunc = getAudioClipFunc;
		//UnitPool = new Dictionary< int , UNIT_DATA >();
		//CampPool = new Dictionary< _CAMP , cCamp >();
		Grids = new cMyGrids();
	}
	void Awake( ){	
		instance = this; 		// special singleton
		bIsReady = false;
		bIsStageEnd = false;
		//UIRoot mRoot = NGUITools.FindInParents<UIRoot>(gameObject);	
		//fUIRatio = (float)mRoot.activeHeight / Screen.height;

		//float ratio = (float)mRoot.activeHeight / Screen.height;

		// UI Event
		// UIEventListener.Get(BackGroundObj).onClick += OnBackGroundClick;
	
		// grid
		//Grids = new cMyGrids ();
		GameScene.Instance.Initial ();							// it will avoid double initial inside.

		Grids = GameScene.Instance.Grids;						// smart pointer reference


	//	ActionPool = List< uAction >();				// record all action to do 
		// Debug Code jump to stage
	//	GameDataManager.Instance.nStageID = 1;


		// create singloten

		// can't open panel in awake
		// Don't open create panel in stage awake. i have develop mode that place stage in scene initial. the panelmanager don't initial here
	

	}