// Start is called before the first frame update void Start() { currentStage = Stages.WaitingForStart; rotationGesture = GameObject.Find("RotationGesture"); twistController = GameObject.Find("Controller").GetComponent <TwistController>(); rotationGesture.SetActive(false); }
public void Permit(bool aroundOnly = false) { isAroundOnlyPermited = aroundOnly; if (!isPermited) { swipeController = GameObject.Find("Controller").GetComponent <SwipesController>(); twistController = GameObject.Find("Controller").GetComponent <TwistController>(); isPermited = true; swipeDownSubscription = swipeController.SubscribeToSwipe(SwipesController.Swipe.Down, _SwipeHandler); swipeLeftSubscription = swipeController.SubscribeToSwipe(SwipesController.Swipe.Left, _SwipeHandler); swipeRightSubscription = swipeController.SubscribeToSwipe(SwipesController.Swipe.Right, _SwipeHandler); swipeUpSubscription = swipeController.SubscribeToSwipe(SwipesController.Swipe.Up, _SwipeHandler); twistSubscription = twistController.SubscribeToTwist(TwistController.Twist.Twist, _TwistHandler); } }