public GameObject CreateCMDButton( _CMD_ID nID , int nArg1 , int nArg2 , int nArg3 ) { GameObject cPrefab = ResourcesManager.CreatePrefabGameObj(nGrid,"Prefab/ColorButton" ); if( cPrefab != null ) { UILabel lab = cPrefab.GetComponentInChildren< UILabel >(); if( lab != null ) { // lab text } // param ColorButton btn = cPrefab.GetComponent<ColorButton>(); if( btn != null) { btn.CMD_ID = nID; btn.nArg.Add( nArg1 ); btn.nArg.Add( nArg2 ); btn.nArg.Add( nArg3 ); } // UIEventListener.Get(cPrefab).onClick += OnButtonClick; } return cPrefab; }
public _CMD_TARGET eCMDAOETARGET; // record Aoe target type public void Clear() { nCmderIdent = 0; eCMDTYPE = _CMD_TYPE._SYS; eCMDSTATUS = _CMD_STATUS._NONE; eCMDTARGET = _CMD_TARGET._ALL; eCMDID = _CMD_ID._NONE; // eLastCMDID = _CMD_ID._NONE; eLASTCMDTYPE = _CMD_TYPE._SYS;; // LAST Cmd type eNEXTCMDTYPE = _CMD_TYPE._SYS; nTarIdent = 0; nOrgGridX = 0; nOrgGridY = 0; nTarGridX = 0; nTarGridY = 0; nSkillID = 0; nAbilityID = 0; nItemID = 0; nAOEID = 0; eCMDAOETARGET = _CMD_TARGET._ALL; }