protected override void OnUnityStart() { pressGesture = TapArea.GetComponent<PressGesture>(); transformGesture = TapArea.GetComponent<TransformGesture>(); releaseGesture = TapArea.GetComponent<ReleaseGesture>(); pressGesture.Pressed += Pressed; transformGesture.StateChanged += (o, e) => { if (e.State == Gesture.GestureState.Changed) Transformed(); }; releaseGesture.Released += Released; }
public override void OnEnter() { gesture = GestureUtils.GetGesture<ReleaseGesture>(Fsm, GameObject, Component, true); if (gesture == null) { LogError("Gesture is missing"); return; } gesture.Released += gestureReleasedHandler; }
protected override void OnUnityStart() { transformGesture = TapArea.GetComponent<TransformGesture>(); pressGesture = TapArea.GetComponent<PressGesture>(); releaseGesture = TapArea.GetComponent<ReleaseGesture>(); transformGesture.StateChanged += TransformStateChanged; pressGesture.Pressed += Pressed; releaseGesture.Released += Released; ArmySpawner.AllDestroyed += ArmySpawnerOnAllDestroyed; ArmySpawner.CollidedWithPlayer += ArmySpawnerOnCollidedWithPlayer; }