//int m_RoundCnt; // Start is called before the first frame update void Start() { //m_RoundCnt = 0; m_ModelDrag = GetComponent <ModelDrag>(); m_ModelDrag.enabled = false; //m_State = BattleState.Start; m_Canvas = GameObject.Find("Canvas").gameObject; m_FinishedButton = m_Canvas.transform.Find("FinishedButton").gameObject; m_FinishedButton.SetActive(false); m_CardPos = new Vector2(UnityEngine.Screen.width * 0.15f, UnityEngine.Screen.height * 0.15f); m_ScreenHeight = UnityEngine.Screen.height; m_ScreenWidth = UnityEngine.Screen.width; m_NewEnemyPos = new Vector3(0, 0, 0); StartCoroutine(SetupBattle()); }
private void InitUIBinder(GameObject gameObject) { m_qizi = GameObject.Find("qizi"); m_chess = m_qizi.gameObject.transform.Find("m_Chess").gameObject; m_worldCamera = GameObject.Find("Main Camera").GetComponent <Camera>(); m_cameraTween = m_worldCamera.GetComponent <TweenPlayer>(); m_userImage = gameObject.transform.Find("Container/m_SelfIcon").GetComponent <Image>(); m_enemyImage = gameObject.transform.Find("Container/m_EnemyIcon").GetComponent <Image>(); m_modelDrag = GameObject.Find("board").GetComponent <ModelDrag>(); m_ready = gameObject.transform.Find("Container/m_Ready").gameObject.GetComponent <Button>(); m_enemyReady = gameObject.transform.Find("Container/m_EnemyReady").gameObject; m_test = gameObject.transform.Find("Container/test").GetComponent <Button>(); m_Undo = gameObject.transform.Find("Container/m_Undo").GetComponent <Button>(); m_animal = GameObject.Find("Animal").GetComponent <Animator>(); }
private void InitUIBinder(GameObject gameObject) { m_qizi = GameObject.Find("qizi"); m_piece = m_qizi.gameObject.transform.Find("m_Chess").gameObject; m_worldCamera = GameObject.Find("Main Camera").GetComponent <Camera>(); m_cameraTween = m_worldCamera.GetComponent <TweenPlayer>(); m_selfTimerObj = gameObject.transform.Find("Container/m_SelfTimer").gameObject; m_selfTimer = m_selfTimerObj.transform.Find("Text").GetComponent <Text>(); m_enemyTimerObj = gameObject.transform.Find("Container/m_EnemyTimer").gameObject; m_enemyTimer = m_enemyTimerObj.transform.Find("Text").GetComponent <Text>(); m_userImage = gameObject.transform.Find("Container/m_SelfIcon").GetComponent <Image>(); m_enemyImage = gameObject.transform.Find("Container/m_EnemyIcon").GetComponent <Image>(); m_modelDrag = GameObject.Find("board").GetComponent <ModelDrag>(); m_ready = gameObject.transform.Find("Container/m_Ready").gameObject.GetComponent <Button>(); m_enemyReady = gameObject.transform.Find("Container/m_EnemyReady").gameObject; m_test = gameObject.transform.Find("Container/test").GetComponent <Button>(); m_Undo = gameObject.transform.Find("Container/m_Undo").GetComponent <Button>(); m_gameStartLogo = gameObject.transform.Find("Container/m_GameBegin").gameObject; m_globalLight = GameObject.Find("GlobalLight"); }
// Start is called before the first frame update void Start() { m_TurnBaseManager = GameObject.Find("TurnBaseManager"); m_ModelDrag = m_TurnBaseManager.GetComponent <ModelDrag>(); m_Clicked = false; }