Пример #1
0
    void OnBlockCreated(RhythmObject o)
    {
        FallingBlock_Tuogui fb = o as FallingBlock_Tuogui;

        if (!fb)
        {
            return;
        }
        var coin = Instantiate(coinPrefab, rollAxis).GetComponent <Coin>();

        coin.o = fb;
        float rad = coinStartAngleDeg * Mathf.Deg2Rad;

        coin.transform.localPosition = new Vector3(radius * Mathf.Sin(rad), radius * Mathf.Cos(rad), leftLane);
        coin.transform.localRotation = Quaternion.Euler(degree, -270, 0);
    }
Пример #2
0
    public void Init(RhythmObject tap,
                     string _word,
                     string _ShowWord,
                     Vector3 targetPos,
                     EffectInOutTiming inOut = EffectInOutTiming.Default)
    {
        //print(_word);
        //print(_ShowWord);
        // 存数值
        _tap        = tap;
        first_word  = _word;
        second_word = _ShowWord;

        preShowTime = 0.001f * CorePlaySettings.Instance.m_PreShowTimeLength;

        _SetState(State.Default);

        // 设置文字组建
        text_word.text  = string.Empty;
        text_word.color = Color.white;
        tran_base.gameObject.SetActive(false);

        // 处理提前进场
        if (inOut == EffectInOutTiming.Both || inOut == EffectInOutTiming.AheadIn)
        {
            //LogManager.Log("Go = 处理提前进场");
            WordEnter();
        }
        else
        {
            WordFadeIn();
        }

        transform.localPosition = targetPos;
        coll.enabled            = true;
    }
Пример #3
0
 public static void DestroyRhythmObject(RhythmObject ro)
 {
     ro.destroyPending = true;
 }