コード例 #1
0
        protected override void Load(ScriptableData.CallData callData)
        {
            if (callData.GetParamNum() >= 8)
            {
                m_StartTime      = long.Parse(callData.GetParamId(0));
                m_RemainTime     = long.Parse(callData.GetParamId(1));
                m_IsNeedCollide  = bool.Parse(callData.GetParamId(2));
                m_IsRelativeUser = bool.Parse(callData.GetParamId(3));
                ScriptableData.CallData vect_param1 = callData.GetParam(4) as ScriptableData.CallData;
                ScriptableData.CallData vect_param2 = callData.GetParam(5) as ScriptableData.CallData;
                ScriptableData.CallData vect_param3 = callData.GetParam(6) as ScriptableData.CallData;
                ScriptableData.CallData vect_param4 = callData.GetParam(7) as ScriptableData.CallData;
                UnityEngine.Vector3     amplitude, perShakeTime, shakeStartSpeed, amplitudeDecayPercent;
                if (null == vect_param1 || null == vect_param2 || null == vect_param3 || null == vect_param4)
                {
                    return;
                }
                amplitude             = ScriptableDataUtility.CalcVector3(vect_param1);
                perShakeTime          = ScriptableDataUtility.CalcVector3(vect_param2);
                shakeStartSpeed       = ScriptableDataUtility.CalcVector3(vect_param3);
                amplitudeDecayPercent = ScriptableDataUtility.CalcVector3(vect_param4);

                m_XShakeInfo = new AxisShaker(m_RemainTime, amplitude.x, perShakeTime.x / 1000.0f, shakeStartSpeed.x, amplitudeDecayPercent.x);
                m_YShakeInfo = new AxisShaker(m_RemainTime, amplitude.y, perShakeTime.y / 1000.0f, shakeStartSpeed.y, amplitudeDecayPercent.y);
                m_ZShakeInfo = new AxisShaker(m_RemainTime, amplitude.z, perShakeTime.z / 1000.0f, shakeStartSpeed.z, amplitudeDecayPercent.z);
            }
            if (callData.GetParamNum() >= 9)
            {
                m_IsFollow = bool.Parse(callData.GetParamId(8));
            }
        }
コード例 #2
0
        public AxisShaker Clone()
        {
            AxisShaker copy = new AxisShaker(RemainTime, Amplitude, PerShakeTime, ShakeStartSpeed, AmplitudeDecayPercent);

            return(copy);
        }