コード例 #1
0
    // Token: 0x06000FEE RID: 4078 RVA: 0x0008AF00 File Offset: 0x00089100
    private static void gmGmkRockChaseMainFall(OBS_OBJECT_WORK obj_work)
    {
        if ((obj_work.move_flag & 1U) != 0U)
        {
            GmSound.PlaySE("BigRock1");
            GmCamera.VibrationSet(0, 12288, 0);
            AppMain.gmGmkRockChaseChangeModeChase(obj_work);
            return;
        }
        OBS_OBJECT_WORK obj_work2 = AppMain.g_gm_main_system.ply_work[(int)((UIntPtr)0)].obj_work;

        if (obj_work2.pos.y < obj_work.pos.y - 2097152)
        {
            AppMain.gmGmkRockChaseChangeModeEnd(obj_work);
        }
    }
コード例 #2
0
    // Token: 0x06000FF3 RID: 4083 RVA: 0x0008B430 File Offset: 0x00089630
    private static void gmGmkRockFallMainStart(OBS_OBJECT_WORK obj_work)
    {
        AppMain.GMS_GMK_ROCK_FALL_WORK gms_GMK_ROCK_FALL_WORK = (AppMain.GMS_GMK_ROCK_FALL_WORK)obj_work;
        OBS_OBJECT_WORK obs_OBJECT_WORK = (OBS_OBJECT_WORK)gms_GMK_ROCK_FALL_WORK.hook_work;

        if (obs_OBJECT_WORK.pos.y + 98304 > obj_work.pos.y)
        {
            return;
        }
        AppMain.GMS_EFFECT_3DES_WORK gms_EFFECT_3DES_WORK = AppMain.GmEfctZoneEsCreate(obj_work, 2, 17);
        gms_EFFECT_3DES_WORK.efct_com.obj_work.pos.z = 131072;
        GmSound.PlaySE("BigRock4");
        obj_work.pos.y = obs_OBJECT_WORK.pos.y + 98304;
        GmCamera.VibrationSet(0, 4096, 0);
        obj_work.move_flag &= 4294967167U;
        obj_work.spd.y      = 0;
        obj_work.ppFunc     = AppMain.gmGmkRockFallMainWait;
    }
コード例 #3
0
    // Token: 0x06000FEF RID: 4079 RVA: 0x0008AF6C File Offset: 0x0008916C
    private static void gmGmkRockChaseMainChase(OBS_OBJECT_WORK obj_work)
    {
        AppMain.GMS_GMK_ROCK_CHASE_WORK gms_GMK_ROCK_CHASE_WORK = (AppMain.GMS_GMK_ROCK_CHASE_WORK)obj_work;
        AppMain.GMS_ENEMY_3D_WORK       gms_ENEMY_3D_WORK       = (AppMain.GMS_ENEMY_3D_WORK)obj_work;
        OBS_OBJECT_WORK target_obj = gms_ENEMY_3D_WORK.ene_com.target_obj;
        int             num        = target_obj.pos.x - obj_work.pos.x;
        uint            num2       = AppMain.gmGmkRockChaseGetDirType(gms_GMK_ROCK_CHASE_WORK);

        if (num2 == 0U)
        {
            if (( int )obj_work.dir.z <= AppMain.NNM_DEGtoA16(180f))
            {
                num2 = 1U;
            }
            else
            {
                num2 = 2U;
            }
            AppMain.gmGmkRockChaseSetDirType(gms_GMK_ROCK_CHASE_WORK, num2);
        }
        int num3;
        int num4;

        if ((num2 == 1U && num < 0) || (num2 == 2U && num >= 0))
        {
            num3 = 768;
            num4 = 32768;
            if (gms_GMK_ROCK_CHASE_WORK.flag_vib)
            {
                AppMain.GMM_PAD_VIB_STOP();
                gms_GMK_ROCK_CHASE_WORK.flag_vib = false;
            }
        }
        else
        {
            int num5 = AppMain.MTM_MATH_ABS(target_obj.spd_m);
            if (num5 < AppMain.gmGmkRockChaseGetSpeed(gms_GMK_ROCK_CHASE_WORK))
            {
                num3 = 512;
                num4 = 65536;
            }
            else
            {
                int num6 = AppMain.MTM_MATH_ABS(num);
                int num7 = AppMain.gmGmkRockChaseGetLength(gms_GMK_ROCK_CHASE_WORK);
                int num8 = AppMain.FX_Mul(num7, 8192);
                if (num8 < 1228800)
                {
                    num8 = 1228800;
                }
                if (num6 > num8)
                {
                    num3 = 3840;
                    num4 = ( int )(( long )num5 + 32768L);
                    if (gms_GMK_ROCK_CHASE_WORK.flag_vib)
                    {
                        AppMain.GMM_PAD_VIB_STOP();
                        gms_GMK_ROCK_CHASE_WORK.flag_vib = false;
                    }
                }
                else if (num6 > num7)
                {
                    num3 = 768;
                    num4 = ( int )(( long )num5 + 10240L);
                    if (!gms_GMK_ROCK_CHASE_WORK.flag_vib)
                    {
                        AppMain.GMM_PAD_VIB_MID_NOEND();
                        gms_GMK_ROCK_CHASE_WORK.flag_vib = true;
                    }
                }
                else
                {
                    num3 = -768;
                    num4 = ( int )(( long )num5 + -6144L);
                    if (!gms_GMK_ROCK_CHASE_WORK.flag_vib)
                    {
                        AppMain.GMM_PAD_VIB_MID_NOEND();
                        gms_GMK_ROCK_CHASE_WORK.flag_vib = true;
                    }
                }
            }
        }
        if (num2 == 1U)
        {
            obj_work.spd_m += num3;
            AppMain.gmGmkRockChaseAddAngleZ(gms_GMK_ROCK_CHASE_WORK, 1000);
            if (obj_work.spd_m > num4)
            {
                obj_work.spd_m = num4;
            }
        }
        else
        {
            num3            = -num3;
            num4            = -num4;
            obj_work.spd_m += num3;
            AppMain.gmGmkRockChaseAddAngleZ(gms_GMK_ROCK_CHASE_WORK, -1000);
            if (obj_work.spd_m < num4)
            {
                obj_work.spd_m = num4;
            }
        }
        if ((obj_work.move_flag & 1U) == 0U)
        {
            AppMain.gmGmkRockChaseChangeModeFall(obj_work);
            return;
        }
        if (gms_GMK_ROCK_CHASE_WORK.current_bound >= 0)
        {
            gms_GMK_ROCK_CHASE_WORK.current_bound = 0;
            if (AppMain.mtMathRand() % 10 == 0)
            {
                int num9 = (int)(32 + AppMain.mtMathRand() % 16);
                gms_GMK_ROCK_CHASE_WORK.target_bound   = -num9 * 4096;
                gms_GMK_ROCK_CHASE_WORK.current_bound -= 8192;
                if (gms_GMK_ROCK_CHASE_WORK.se_handle != null)
                {
                    GsSound.StopSE(gms_GMK_ROCK_CHASE_WORK.se_handle);
                    return;
                }
            }
        }
        else if (gms_GMK_ROCK_CHASE_WORK.target_bound > gms_GMK_ROCK_CHASE_WORK.current_bound)
        {
            gms_GMK_ROCK_CHASE_WORK.target_bound   = 0;
            gms_GMK_ROCK_CHASE_WORK.current_bound += 8192;
            if (gms_GMK_ROCK_CHASE_WORK.current_bound >= 0)
            {
                GmSound.PlaySE("BigRock1");
                GmSound.PlaySE("BigRock2", gms_GMK_ROCK_CHASE_WORK.se_handle);
                GmCamera.VibrationSet(0, 12288, 0);
                return;
            }
        }
        else
        {
            gms_GMK_ROCK_CHASE_WORK.current_bound -= 8192;
        }
    }