/// <summary> /// returns whether any changes were made /// </summary> /// <returns></returns> public virtual bool ResetActions() { bool changes = false; if (PrimaryActionEvent != GetPrimaryAction) { changes = true; } if (SecondaryActionEvent != GetSecondaryAction) { changes = true; } PrimaryActionEvent = GetPrimaryAction; SecondaryActionEvent = GetSecondaryAction; return(changes); }
private void OnEnable() { collisionTracker = GetComponent <CollisionTrackerNew>(); collisionTracker.CollisionStarted.AddListener(touch.NotifyTouched); collisionTracker.CollisionChanged.AddListener(touch.NotifyTouchChanged); collisionTracker.CollisionStopped.AddListener(touch.NotifyUnTouched); if (PrimaryActionEvent == null) { PrimaryActionEvent = this.GetPrimaryAction; } if (SecondaryActionEvent == null) { SecondaryActionEvent = this.GetSecondaryAction; } }