public void BacktoLogin() { GameObject LoginPanel = LoadBundleOperation.LoadBundle("LoginPanel.prefab"); LoginPanel.transform.SetParent(transform.parent.transform); LoginPanel.GetComponent<RectTransform>().offsetMax = Vector2.zero; LoginPanel.GetComponent<RectTransform>().offsetMin = Vector2.zero; this.gameObject.SetActive(false); Destroy(this.gameObject, 0.1f); }
public void RegisterAccount() { GameObject RegisterPanel = LoadBundleOperation.LoadBundle("RegisterPanel.prefab"); RegisterPanel.transform.SetParent(transform.parent.transform); RegisterPanel.GetComponent <RectTransform>().offsetMax = Vector2.zero; RegisterPanel.GetComponent <RectTransform>().offsetMin = Vector2.zero; this.gameObject.SetActive(false); Destroy(this.gameObject, 0.1f); }
public override void Execute() { player = GameObject.Find("Player"); GameObject BallParticle = LoadBundleOperation.LoadBundle("Ball.prefab"); Matrix4x4 lam = player.transform.localToWorldMatrix; Vector3 po1 = lam * new Vector3(0f, 0.8f, 1.2f); BallParticle.transform.position = player.transform.position + po1; BallParticle.GetComponent <balls>().forward = player.transform.forward; Debug.Log("I`m skillone!"); }
void Start() { GameObject NormalGamePanel = LoadBundleOperation.LoadBundle("NormalGamePanel.prefab"); NormalGamePanel.transform.SetParent(transform); NormalGamePanel.GetComponent <RectTransform>().offsetMax = Vector2.zero; NormalGamePanel.GetComponent <RectTransform>().offsetMin = Vector2.zero; //GameObject LoginPanel = LoadBundleOperation.LoadBundle("LoginPanel.prefab"); //LoginPanel.transform.SetParent(transform); //LoginPanel.GetComponent<RectTransform>().offsetMax = Vector2.zero; //LoginPanel.GetComponent<RectTransform>().offsetMin = Vector2.zero; BackpackPanel.SetActive(false); }
public void EnterGame() { if (DealServer.sbyaccount(account.text) == psw.text) { GameObject NormalGamePanel = LoadBundleOperation.LoadBundle("NormalGamePanel.prefab"); NormalGamePanel.transform.SetParent(transform.parent.transform); NormalGamePanel.GetComponent <RectTransform>().offsetMax = Vector2.zero; NormalGamePanel.GetComponent <RectTransform>().offsetMin = Vector2.zero; this.gameObject.SetActive(false); Destroy(this.gameObject, 0.1f); } else { showmessage.text = "用户名或密码错误!"; showmessage.color = Color.red; } }
public LoadBundleOperation GetLoadBundleOperation(string bundlePath) { var op = new LoadBundleOperation(this, bundlePath); return(op); }