Ejemplo n.º 1
0
        /// <summary>
        /// Processes the start of a touch at position
        /// </summary>
        /// <param name="position"></param>
        private void ProcessStartHold(Vector2 position)
        {
            lock (this) {
                if (flipState != FlipState.Idle || heldCoin != null ||
                    (heldCoin = GetTouchedCoin(position)) == null)
                {
                    return;
                }

                flipState = FlipState.Holding;
                HoldStarted?.Invoke(CurrentArgs);
            }

            startTouchPosition = position;
            heldCoin.Hold();

            /// create possible moves circles
            int coinNumber = Array.IndexOf(coins, heldCoin.gameObject);

            SetupGuide(new Move((byte)coinNumber, Side.Left), guideLeft);
            SetupGuide(new Move((byte)coinNumber, Side.Right), guideRight);
        }
Ejemplo n.º 2
0
 public void OnHoldStarted()
 {
     EnableAllParticles();
     Rigidbody.isKinematic = true;
     HoldStarted?.Invoke(this);
 }