コード例 #1
0
    void OnClick()
    {
        if (!isClicked)
        {
            isClicked = true;
//			GameObject goChecked = Instantiate( Resources.Load("Prefab/Play/EnemyBluetoothCheck")) as GameObject;
//			goChecked.transform.parent = this.gameObject.transform;
//			goChecked.transform.localScale = Vector2.one;
//			goChecked.transform.localPosition = Vector2.one;
//			goChecked.transform.GetComponent<UIWidget>().SetAnchor(this.gameObject);
//			goChecked.SetActive(true);
            this.enemyBluetoothState = EEnemyBluetoothState.Checked;
        }
        else
        {
            initToGame();


            this.enemyBluetoothState = EEnemyBluetoothState.Normal;
            isClicked = false;
        }
    }
コード例 #2
0
	void OnClick()
	{

		if (!isClicked) 
		{
			isClicked = true;
//			GameObject goChecked = Instantiate( Resources.Load("Prefab/Play/EnemyBluetoothCheck")) as GameObject;
//			goChecked.transform.parent = this.gameObject.transform;
//			goChecked.transform.localScale = Vector2.one;
//			goChecked.transform.localPosition = Vector2.one;
//			goChecked.transform.GetComponent<UIWidget>().SetAnchor(this.gameObject);
//			goChecked.SetActive(true);
			this.enemyBluetoothState = EEnemyBluetoothState.Checked;
		}
		else 
		{
			initToGame();


			this.enemyBluetoothState = EEnemyBluetoothState.Normal;	
			isClicked = false;
		}
		
	}