Пример #1
0
        //--------------------------------------------
        public virtual void InitTile(MidiTile data, float lenght,
                                     float musictime,
                                     float delaytime,
                                     float startpresstime)
        {
            m_TileData = data;

            float alltime = delaytime + musictime;

            m_EndProcess   = (float)m_TileData.EndTime / alltime;
            m_DelayProcess = delaytime / alltime;

            //m_StartProcess = startprocess;
            //m_EndProcess = endprocess;
            m_DelayDisappearProcess = disppeartime / alltime;

            m_CurProcess = 0;

            m_StartpressTime = startpresstime;

            m_DelayTime = delaytime;

            m_MoveTime = 0;

            m_LeastMoveTime = m_DelayTime
                              - m_StartpressTime;

            //m_bCanTouch = false;

            m_bIsUseing = true;

            //m_bIsTouched = false;
            m_TouchState = TouchState.CanTouch;
        }
Пример #2
0
        public override void InitTile(
            MidiTile data,
            float scale,
            float musictime, float delaytime,
            float startpresstime
            )
        {
            base.InitTile(data, scale, musictime, delaytime, startpresstime);

            RenderModel = this.GetComponent <MorphCurve>();

            m_SelfMaterial = this.GetComponent <MeshRenderer>().material;

            RenderModel.SetLength(m_Height);
            RenderModel.SetWidth(0.2f);
            RenderModel.SetDepth(scale);

            m_EnablePressed = false;
            m_PressedHeight = 0;

            m_PressedTime = 0.0f;

            if (m_PressParticle != null)
            {
                m_PressParticle.SetActive(false);
            }
        }
Пример #3
0
        public TileSpawner(
            MidiTile data, float l)
        {
            m_SelfData = data;

            m_Length = l;
        }
Пример #4
0
        //--------------------------------------

        public override void InitTile(
            MidiTile data, float scale,
            float musictime, float delaytime,
            float startpresstime
            )
        {
            base.InitTile(data, scale, musictime, delaytime, startpresstime);

            RenderModel = this.GetComponent <MorphCube>();

            m_SelfMaterial = this.GetComponent <MeshRenderer>().material;

            RenderModel.SetLength(m_Height);
            RenderModel.SetWidth(0.2f);
            RenderModel.SetDepth(scale * 1f);

            if (scale > 2)
            {
                RenderModel.segment_z = (int)scale + 1;
            }
            // 临时注释掉
            //RenderModel.collidescale = 1.5f;

            m_EnablePressed = false;

            m_PressedHeight = 0;
        }