private void onTouch(GameObject go) { if (this.children == null || this.children.Length <= 1) { return; } int length = this.children.Length; int i = 0; while (i < length) { if (this.children[i].name == go.name) { if (i == this.currentIndex) { return; } this.Active(i); DelegateProxy.PlayUIAudio(15); if (this.touchEvent != null) { this.touchEvent(i, this.children[i]); } break; } else { i++; } } }
private void CreateMouseObj() { string strFileName = "Prefabs/UI/MousePanel"; //string strFile = strFileName.ToLower(); DelegateProxy.LoadAsset(strFileName, OnPrefabLoaded); }
public static void OnShareCallback(string result) { if (DelegateProxy.OnShareCallbackProxy != null) { DelegateProxy.OnShareCallbackProxy(result); } }
private void OnValidateLoadComplete(params object[] args) { if (this.mGo == null) { return; } this.mPrefab = (args[0] as UnityEngine.Object); if (this.mPrefab != null) { GameObject gameObject = DelegateProxy.Instantiate(this.mPrefab, Vector3.zero, Quaternion.identity) as GameObject; if (gameObject != null) { gameObject.transform.parent = base.transform; gameObject.transform.localPosition = this.mvecPos; gameObject.transform.localRotation = Quaternion.Euler(this.mvecRot); gameObject.transform.localScale = this.mvecScale; this.mGoEffect = gameObject; NGUITools.SetLayer(this.mGoEffect, this.mGo.layer); this.mGoEffect.SetActive(this.mbCurActive); this.mbValidate = false; } } if (this.LoadModelComplete != null) { this.LoadModelComplete(this.mGoEffect); } if (this.gameObjectActiveCallBack != null) { this.gameObjectActiveCallBack(); } }
public static void GameDestory(UnityEngine.Object obj) { if (DelegateProxy.GameDestoryProxy != null) { DelegateProxy.GameDestoryProxy(obj); } }
public static void OnSendMessageCallback(int iMSG, params object[] objects) { if (DelegateProxy.onSendMessageCallbackDelegateProxy != null) { DelegateProxy.onSendMessageCallbackDelegateProxy(iMSG, objects); } }
/// <summary> /// Registers a object as CoreRemoting service. /// </summary> /// <param name="serviceInstance">Object instance that should be registered as service</param> /// <param name="serviceName">Unique service name (Interface full type name is used, if left blank)</param> /// <param name="interfaceType">Service interface type</param> /// <param name="uniqueServerInstanceName">Unique server instance name</param> /// <returns>Service name</returns> public static string Marshal( object serviceInstance, string serviceName, Type interfaceType, string uniqueServerInstanceName = "") { var server = string.IsNullOrWhiteSpace(uniqueServerInstanceName) ? RemotingServer.DefaultRemotingServer : RemotingConfiguration.GetRegisteredServer(uniqueServerInstanceName); var container = server.ServiceRegistry; var registerServiceMethod = container.GetRegisterServiceMethodForServiceInstance(interfaceType, serviceInstance); if (string.IsNullOrWhiteSpace(serviceName)) { serviceName = interfaceType.FullName; } var genericFunc = typeof(Func <>); var factoryFunc = genericFunc.MakeGenericType(interfaceType); var factoryFuncProxy = new DelegateProxy(factoryFunc, delegateArgs => serviceInstance); registerServiceMethod.Invoke(container, new object[] { factoryFuncProxy.ProxiedDelegate, ServiceLifetime.Singleton, serviceName }); return(serviceName); }
public static void OnSetPayCallback(List <IAPProductInfo> productInfos) { if (DelegateProxy.OnSetPayCallbackProxy != null) { DelegateProxy.OnSetPayCallbackProxy(productInfos); } }
public static void PlayUIAudio(int index) { if (DelegateProxy.PlayUIAudioProxy != null) { DelegateProxy.PlayUIAudioProxy(index); } }
public static void GetGuiCompent(Dictionary <int, GameObject> lastgameObject, ref List <Component> newPanels, ref List <Component> tempPanels) { if (DelegateProxy.GetGuiCompentProxy != null) { DelegateProxy.GetGuiCompentProxy(lastgameObject, ref newPanels, ref tempPanels); } }
public static void DestroyEffect(GameObject obj, int layer) { if (DelegateProxy.DestroyEffectProxy != null) { DelegateProxy.DestroyEffectProxy(obj, layer); } }
public static void HideView(string name) { if (DelegateProxy.HideViewProxy != null) { DelegateProxy.HideViewProxy(name); } }
public static void LoadAsset(string strFileName, AssetCallBack callback) { if (DelegateProxy.LoadAssetProxy != null) { DelegateProxy.LoadAssetProxy(strFileName, callback); } }
public static void UnloadAsset(object[] args) { if (DelegateProxy.UnloadAssetProxy != null) { DelegateProxy.UnloadAssetProxy(args); } }
public static void DestroyView(string name) { if (DelegateProxy.DestroyViewProxy != null) { DelegateProxy.DestroyViewProxy(name); } }
public static void ShowView(string name, object arg = null) { if (DelegateProxy.ShowViewProxy != null) { DelegateProxy.ShowViewProxy(name, arg); } }
public static void GamePoolDestory(GameObject obj) { if (DelegateProxy.GameDestoryPoolProxy != null) { DelegateProxy.GameDestoryPoolProxy(obj); } }
public static void PopCache(UnityEngine.Object o) { if (DelegateProxy.PopCacheProxy != null) { DelegateProxy.PopCacheProxy(o); } }
public static void OnVerifyTransCallback(string pid, int amount, string transactionData, string transactionIdentifier, string account, string rolename, string serverid, string accountid) { if (DelegateProxy.OnVerifyTransCallbackProxy != null) { DelegateProxy.OnVerifyTransCallbackProxy(pid, amount, transactionData, transactionIdentifier, account, rolename, serverid, accountid); } }
public void ClearAnimationClips() { if (this.mAnimation == null || this.mActionControlList.Count == 0) { return; } for (int i = 0; i < this.mActionControlList.Count; i++) { string key = this.mActionControlList[i]; if (this.mActionLoadedDict.ContainsKey(key)) { AnimationClip animationClip = this.mActionLoadedDict[key]; if (animationClip != null) { this.mAnimation.RemoveClip(animationClip); } this.mActionLoadedDict.Remove(key); DelegateProxy.PopCache(animationClip); } } if (this.mAnimation.clip != null && !this.mActionControlList.Contains(this.mAnimation.clip.name)) { this.mAnimation.RemoveClip(this.mAnimation.clip); DelegateProxy.PopCache(this.mAnimation.clip); this.mAnimation.clip = null; } }
private void OnDisable() { if (this.m_Material) { DelegateProxy.DestroyObjectImmediate(this.m_Material); } }
private void OnClickEvent(GameObject go) { DelegateProxy.OnSendMessageCallback(this.messageID, new object[] { this.subMessagetID }); }
protected virtual void OnDisable() { if (this.mMaterial) { DelegateProxy.DestroyObjectImmediate(this.mMaterial); } }
/// <summary> /// 清除所有动作引用 /// </summary> public void ClearAnimationClips() { if (mAnimation == null || mActionControlList.Count == 0) { return; } ///清除所有一次性动作 for (int i = 0; i < mActionControlList.Count; i++) { string strActionName = mActionControlList[i]; if (mActionLoadedDict.ContainsKey(strActionName)) { AnimationClip aClip = mActionLoadedDict[strActionName]; mAnimation.RemoveClip(aClip); mActionLoadedDict.Remove(strActionName); DelegateProxy.PopCache(aClip); } } ///清除主动作 if (mAnimation.clip != null) { mAnimation.RemoveClip(mAnimation.clip); DelegateProxy.PopCache(mAnimation.clip); mAnimation.clip = null; } }
/// <summary> /// 根据当前场景的地图信息,计算生成地形网格顶点列表 /// </summary> public void BuildGeometry() { if (this.mesh == null) { this.mesh = new Mesh(); } int segmentsW = this.terrainData.segmentsW; int segmentsH = this.terrainData.segmentsH; int num = segmentsW + 1; int num2 = (segmentsH + 1) * num; this.vertices = new Vector3[num2]; num2 = 0; for (int i = 0; i <= segmentsH; i++) { for (int j = 0; j <= segmentsW; j++) { float num3 = ((float)j / (float)segmentsW - 0.5f) * this.terrainData.size.x; float num4 = ((float)i / (float)segmentsH - 0.5f) * this.terrainData.size.z; float height = GameScene.mainScene.terrainData.GetHeight(Mathf.FloorToInt(num3 + base.transform.position.x + 240f), Mathf.FloorToInt(num4 + base.transform.position.z + 240f)); this.vertices[num2] = new Vector3(num3, height, num4); num2++; } } this.mesh.vertices = this.vertices; if (Application.isEditor && base.gameObject != null) //如果是编辑器环境,销毁重建网格碰撞器 { MeshCollider component = base.gameObject.GetComponent <MeshCollider>(); if (component != null) { DelegateProxy.DestroyObjectImmediate(component); base.gameObject.AddComponent <MeshCollider>(); } } }
private void CreateMouseObj() { string text = "Prefabs/UI/MousePanel"; string text2 = text.ToLower(); DelegateProxy.LoadAsset(text, new AssetCallBack(this.OnPrefabLoaded)); }
/// <summary> /// 设置不可视 ,开始隐藏 /// </summary> public void Invisible() { if (this.visible) { if (this.bornEffect != null) { DelegateProxy.GameDestory(this.bornEffect); } if (this.isStatic) { if (this.ins != null) { this.ins.SetActive(false); } } else if (this.ins != null) { this.ins.SetActive(false); if (this.activeListener != null) { this.activeListener(false); } } } this.visible = false; }
public void DestroyAll() { foreach (KeyValuePair <string, SpawnPool> current in this._pools) { DelegateProxy.GameDestory(current.Value); } }
public static UnityEngine.Object Instantiate(UnityEngine.Object o) { if (DelegateProxy.mDelegateInstantiateNoParam != null) { return(DelegateProxy.mDelegateInstantiateNoParam(o)); } return(UnityEngine.Object.Instantiate(o)); }
public static string StringBuilder(params object[] args) { if (DelegateProxy.StringBuilderPorxy != null) { return(DelegateProxy.StringBuilderPorxy(args)); } return(string.Empty); }