private void OnDestroy() { UnityEngine.Object.Destroy((UnityEngine.Object) this.mScene); EventDialogBubble.DiscardAll(); EventDialogBubbleCustom.DiscardAll(); EventStandCharaController2.DiscardAll(); for (int index = 0; index < this.Actions.Length; ++index) { UnityEngine.Object.Destroy((UnityEngine.Object) this.Actions[index]); } if (!UnityEngine.Object.op_Inequality((UnityEngine.Object)EventScript.Canvas, (UnityEngine.Object)null)) { return; } ((UnityEvent)((Button)((Component)EventScript.Canvas).GetComponent <Button>()).get_onClick()).RemoveListener(this.mClickAction); HoldGesture component = (HoldGesture)((Component)EventScript.Canvas).GetComponent <HoldGesture>(); if (UnityEngine.Object.op_Inequality((UnityEngine.Object)component, (UnityEngine.Object)null)) { // ISSUE: method pointer component.OnHoldStart.RemoveListener(new UnityAction((object)this, __methodptr(OnDown))); // ISSUE: method pointer component.OnHoldEnd.RemoveListener(new UnityAction((object)this, __methodptr(OnUp))); } EventScript.DestroyCanvas(); }
private void Awake() { this.isHighlighted = false; this.uiCam = (Camera)null; SGHighlightObject.instance = this; this.canvas = (Canvas)((Component)this).get_gameObject().GetComponent <Canvas>(); // ISSUE: method pointer this.clickAction = new UnityAction((object)this, __methodptr(OnClick)); ((UnityEvent)((Button)((Component)this.canvas).get_gameObject().AddComponent <Button>()).get_onClick()).AddListener(this.clickAction); if (Object.op_Inequality((Object)this.nextButton, (Object)null)) { ((UnityEvent)this.nextButton.get_onClick()).AddListener(this.clickAction); } HoldGesture holdGesture = (HoldGesture)((Component)this.canvas).get_gameObject().AddComponent <HoldGesture>(); if (!Object.op_Inequality((Object)holdGesture, (Object)null)) { return; } // ISSUE: method pointer UnityAction unityAction1 = new UnityAction((object)this, __methodptr(OnDown)); holdGesture.OnHoldStart = new UnityEvent(); holdGesture.OnHoldStart.AddListener(unityAction1); // ISSUE: method pointer UnityAction unityAction2 = new UnityAction((object)this, __methodptr(OnUp)); holdGesture.OnHoldEnd = new UnityEvent(); holdGesture.OnHoldEnd.AddListener(unityAction2); }
private void Canvas_Loaded(object sender, RoutedEventArgs e) { // Load Kinect events //JumpGesture jumper = new JumpGesture(); //jumper.UserJumped += new EventHandler(jumper_UserJumped); //_sharedData.GestureController.AddGesture(jumper); HoldGesture holder = new HoldGesture(); holder.UserHolded += new EventHandler(Holder_hold); _sharedData.PlayerOneController.AddGesture(this, holder); }
private void Start() { Debug.LogWarning((object)this); // ISSUE: method pointer this.mClickAction = new UnityAction((object)this, __methodptr(OnClick)); ((UnityEvent)((Button)((Component)EventScript.Canvas).GetComponent <Button>()).get_onClick()).AddListener(this.mClickAction); HoldGesture component = (HoldGesture)((Component)EventScript.Canvas).GetComponent <HoldGesture>(); if (Object.op_Inequality((Object)component, (Object)null)) { // ISSUE: method pointer this.mDownAction = new UnityAction((object)this, __methodptr(OnDown)); component.OnHoldStart = new UnityEvent(); component.OnHoldStart.AddListener(this.mDownAction); // ISSUE: method pointer this.mUpAction = new UnityAction((object)this, __methodptr(OnUp)); component.OnHoldEnd = new UnityEvent(); component.OnHoldEnd.AddListener(this.mUpAction); } this.StartCoroutine(this.PreloadAssetsAsync()); }