示例#1
0
    private void UpdateUserPrefab(UserLegionSetupper setupper)
    {
        EDUtilFunctions.EditApplySerializedPrefab <CharAnimateCtrl>(
            setupper.m_baseUserCtrl,
            (ser) =>
        {
            ser.FindProperty("m_moveSpeed").floatValue = setupper.m_moveSpeed;
            ser.FindProperty("m_jumpPower").floatValue = setupper.m_jumpPower;
        });

        EDUtilFunctions.EditApplySerializedPrefab <LauncherCtrl>(
            setupper.m_baseUserCtrl,
            (ser) =>
        {
            ser.FindProperty("m_pitchSpeed").floatValue     = setupper.m_pitchSpeed;
            ser.FindProperty("m_minPitchAngle").floatValue  = setupper.m_minPitchAngle;
            ser.FindProperty("m_maxPitchAngle").floatValue  = setupper.m_maxPitchAngle;
            ser.FindProperty("m_yawSpeed").floatValue       = setupper.m_yawSpeed;
            ser.FindProperty("m_shotPower").floatValue      = setupper.m_shotPower;
            ser.FindProperty("m_shot3WayAngle").floatValue  = setupper.m_shot3WayAngle;
            ser.FindProperty("m_knockbackTime").floatValue  = setupper.m_knockbackTime;
            ser.FindProperty("m_chargeShotTime").floatValue = setupper.m_chargeShotTime;
        });

        EDUtilFunctions.EditApplySerializedPrefab <LauncherMagazine>(
            setupper.m_baseUserCtrl,
            (ser) =>
        {
            SerializedProperty reloadTime = ser.FindProperty("m_reloadTime");
            reloadTime.floatValue         = setupper.m_reloadTime;
        });

        EDUtilFunctions.EditApplySerializedPrefab <UserCameraAutoCtrl>(
            setupper.m_baseUserCamera,
            (ser) =>
        {
            SerializedProperty rotateSpeed   = ser.FindProperty("m_rotateSpeed");
            rotateSpeed.floatValue           = setupper.m_cameraRotateSpeed;
            SerializedProperty pivotLerpTime = ser.FindProperty("m_pivotLerpTime");
            pivotLerpTime.floatValue         = setupper.m_cameraPivotLerpTime;
        });
    }