Beispiel #1
0
 void OnCustomModeOff()
 {
     //Debug.Log(2);
     tweenRot.PlayReverse();
     CustomModeOff();
     buttonEvent.methodName = "OnCustomModeOn";
 }
    void PlayBXAnimation()
    {
        PlayIndex++;
        if (FanZhuan == 0)
        {
            FanZhuan = 1;
            TRotation.PlayReverse();
        }
        else if (FanZhuan == 1)
        {
            FanZhuan = 0;
            TRotation.PlayForward();
        }

        float duration = 0;

        if (PlayIndex >= 4)
        {
            PlayIndex = 0;
            duration  = Oldduration + 0.9f;
        }
        else
        {
            duration = Oldduration;
        }

        if (FanZhuan < 2)
        {
            Invoke("PlayBXAnimation", duration);
        }
    }
Beispiel #3
0
 public void showSettingUI()
 {
     if (isHide)
     {
         tweenrotation.PlayForward();
         isHide = false;
     }
     else
     {
         tweenrotation.PlayReverse();
         isHide = true;
     }
 }
Beispiel #4
0
    public void AutoFanZhan()
    {
        if (!this.enabled)
        {
            ResetPos();
            return;
        }

        if (!forwardOrReverse)
        {
            LS.PlayReverse();
            RS.PlayReverse();
        }
        else
        {
            LS.PlayForward();
            RS.PlayForward();
        }
    }
Beispiel #5
0
    public void CompleteCardTurning()
    {
        string spriteName;

        Debug.Log("3 rotationCompleted for card " + GetCardName() + ": " + rotationCompleted);
        if (!rotationCompleted)
        {
            Debug.Log("turnToFront: " + turnToFront);
            spriteName            = (turnToFront ? gameObject.tag : "CardBack");
            uiSprite.spriteName   = spriteName;
            uiButton.normalSprite = spriteName;
            Debug.Log("CompleteCardTuring " + GetCardName() + " with " + spriteName);
            rotation.PlayReverse();
            front             = turnToFront;
            turnToFront       = !turnToFront;
            rotationCompleted = true;
        }
        else
        {
            GameManager.instance.CheckCard();
        }
    }
Beispiel #6
0
    public void flipCard(int Thecardvalue)
    {
        flip = true;

        tweenRotation.enabled = true;
        if (Face)
        {
            //Animate flying card into prizes box

            //LaunchFlyingCard();

            to        = new Vector3(0, 180, 0);
            Face      = false;
            cardvalue = Thecardvalue;
        }
        else
        {
            to        = new Vector3(0, 0, 0);
            Face      = true;
            cardvalue = 0;
            tweenRotation.PlayReverse();
        }
    }