Пример #1
0
 private static void gmGmkBumperDestFunc(AppMain.MTS_TASK_TCB tcb)
 {
     AppMain.GMS_GMK_BUMPER_WORK gmsGmkBumperWork = tcb.work is AppMain.GMS_GMK_BUMPER_WORK ? (AppMain.GMS_GMK_BUMPER_WORK)tcb.work : (AppMain.GMS_GMK_BUMPER_WORK)AppMain.mtTaskGetTcbWork(tcb);
     if (gmsGmkBumperWork.se_handle != null)
     {
         AppMain.GmSoundStopSE(gmsGmkBumperWork.se_handle);
         AppMain.GsSoundFreeSeHandle(gmsGmkBumperWork.se_handle);
         gmsGmkBumperWork.se_handle = (AppMain.GSS_SND_SE_HANDLE)null;
     }
     AppMain.GmEnemyDefaultExit(tcb);
 }
 // Token: 0x06000077 RID: 119 RVA: 0x00006310 File Offset: 0x00004510
 private static void gmGmkBumperDestFunc(AppMain.MTS_TASK_TCB tcb)
 {
     AppMain.GMS_GMK_BUMPER_WORK gms_GMK_BUMPER_WORK = (tcb.work is AppMain.GMS_GMK_BUMPER_WORK) ? ((AppMain.GMS_GMK_BUMPER_WORK)tcb.work) : ((AppMain.GMS_GMK_BUMPER_WORK)AppMain.mtTaskGetTcbWork(tcb));
     if (gms_GMK_BUMPER_WORK.se_handle != null)
     {
         AppMain.GmSoundStopSE(gms_GMK_BUMPER_WORK.se_handle);
         AppMain.GsSoundFreeSeHandle(gms_GMK_BUMPER_WORK.se_handle);
         gms_GMK_BUMPER_WORK.se_handle = null;
     }
     AppMain.GmEnemyDefaultExit(tcb);
 }
 // Token: 0x06000075 RID: 117 RVA: 0x000061EC File Offset: 0x000043EC
 private static void gmGmkBumperInit(AppMain.OBS_OBJECT_WORK obj_work, int bumper_type)
 {
     AppMain.GMS_ENEMY_3D_WORK gms_ENEMY_3D_WORK = (AppMain.GMS_ENEMY_3D_WORK)obj_work;
     AppMain.gmGmkBumperSetRect(gms_ENEMY_3D_WORK, bumper_type);
     obj_work.move_flag = 8448U;
     obj_work.dir.z     = AppMain.g_gm_gmk_bumper_angle_z[bumper_type];
     AppMain.ObjDrawObjectActionSet3DNNMaterial(obj_work, 0);
     obj_work.disp_flag |= 4194324U;
     obj_work.pos.z      = -122880;
     AppMain.GMS_GMK_BUMPER_WORK gms_GMK_BUMPER_WORK = (AppMain.GMS_GMK_BUMPER_WORK)gms_ENEMY_3D_WORK;
     gms_GMK_BUMPER_WORK.se_handle = AppMain.GsSoundAllocSeHandle();
     obj_work.ppFunc = null;
     obj_work.ppMove = null;
     obj_work.ppOut  = new AppMain.MPP_VOID_OBS_OBJECT_WORK(AppMain.gmGmkBumperDrawFunc);
     AppMain.mtTaskChangeTcbDestructor(obj_work.tcb, new AppMain.GSF_TASK_PROCEDURE(AppMain.gmGmkBumperDestFunc));
 }
Пример #4
0
 private static bool gmGmkBumperCheckHitEffect(AppMain.GMS_GMK_BUMPER_WORK bumper_work)
 {
     return(bumper_work.se_handle != null && bumper_work.se_handle.au_player != null && (2 != bumper_work.se_handle.au_player.GetStatus() && 1 != bumper_work.se_handle.au_player.GetStatus()));
 }
Пример #5
0
    private static void gmGmkBumperDefFunc(
        AppMain.OBS_RECT_WORK gimmick_rect,
        AppMain.OBS_RECT_WORK player_rect)
    {
        AppMain.OBS_OBJECT_WORK   parentObj1     = gimmick_rect.parent_obj;
        AppMain.GMS_ENEMY_3D_WORK gmsEnemy3DWork = (AppMain.GMS_ENEMY_3D_WORK)parentObj1;
        AppMain.OBS_OBJECT_WORK   parentObj2     = player_rect.parent_obj;
        if ((parentObj2.holder == null || !(parentObj2.holder is AppMain.GMS_ENEMY_COM_WORK)) && ((AppMain.GMS_PLAYER_WORK)parentObj2).seq_state == 40)
        {
            return;
        }
        int num1 = 32768;
        int num2 = 32768;
        int num3 = -12288;
        int type = AppMain.gmGmkBumperCalcType((int)gmsEnemy3DWork.ene_com.eve_rec.id);

        if (parentObj2.obj_type == (ushort)1 && !AppMain.gmGmkBumperCheckHit(parentObj1.pos, parentObj2.pos, type))
        {
            return;
        }
        parentObj2.dir.z = (ushort)0;
        AppMain.VecFx32 vecFx32 = new AppMain.VecFx32();
        vecFx32.z = 0;
        vecFx32.x = parentObj2.spd.x;
        vecFx32.y = parentObj2.spd.y;
        int num4         = parentObj2.pos.x - parentObj1.pos.x;
        int num5         = parentObj2.pos.y + num3 - parentObj1.pos.y;
        int num6         = AppMain.MTM_MATH_ABS(vecFx32.x);
        int num7         = AppMain.MTM_MATH_ABS(vecFx32.y);
        int no_move_time = 0;

        switch (type)
        {
        case 0:
            if (num4 > (int)AppMain.g_gmk_bumper_rect[0][2] * 4096 + num1)
            {
                vecFx32.x    = 16384;
                no_move_time = 15;
                break;
            }
            if (num4 < (int)AppMain.g_gmk_bumper_rect[0][0] * 4096 - num1)
            {
                vecFx32.x    = -16384;
                no_move_time = 15;
                break;
            }
            vecFx32.y = 24576;
            if (num4 < -num1)
            {
                vecFx32.x -= 12288;
            }
            else if (num4 > num1)
            {
                vecFx32.x += 12288;
            }
            no_move_time = 5;
            break;

        case 1:
            if (num4 > (int)AppMain.g_gmk_bumper_rect[1][2] * 4096)
            {
                vecFx32.x    = 16384;
                no_move_time = 15;
                break;
            }
            if (num4 < (int)AppMain.g_gmk_bumper_rect[1][0] * 4096)
            {
                vecFx32.x    = -16384;
                no_move_time = 15;
                break;
            }
            vecFx32.y = -24576;
            if (num4 < -num1)
            {
                vecFx32.x -= 12288;
            }
            else if (num4 > num1)
            {
                vecFx32.x += 12288;
            }
            no_move_time = 5;
            break;

        case 2:
            if (num5 < (int)AppMain.g_gmk_bumper_rect[2][1] * 4096)
            {
                vecFx32.y    = -24576;
                no_move_time = 5;
                break;
            }
            if (num5 > (int)AppMain.g_gmk_bumper_rect[2][3] * 4096)
            {
                vecFx32.y    = 24576;
                no_move_time = 5;
                break;
            }
            vecFx32.x = 16384;
            if (num5 < -num2)
            {
                vecFx32.y -= 12288;
            }
            else if (num5 > num2)
            {
                vecFx32.y += 12288;
            }
            no_move_time = 15;
            break;

        case 3:
            if (num5 < (int)AppMain.g_gmk_bumper_rect[3][1] * 4096)
            {
                vecFx32.y    = -24576;
                no_move_time = 5;
                break;
            }
            if (num5 > (int)AppMain.g_gmk_bumper_rect[3][3] * 4096)
            {
                vecFx32.y    = 24576;
                no_move_time = 5;
                break;
            }
            vecFx32.x = -16384;
            if (num5 < -num2)
            {
                vecFx32.y -= 12288;
            }
            else if (num5 > num2)
            {
                vecFx32.y += 12288;
            }
            no_move_time = 15;
            break;

        case 4:
            vecFx32.x    = num6;
            vecFx32.y    = num7;
            vecFx32.x    = 20480;
            vecFx32.y    = 20480;
            no_move_time = 5;
            break;

        case 5:
            vecFx32.x    = num6;
            vecFx32.y    = -num7;
            vecFx32.x    = 20480;
            vecFx32.y    = -20480;
            no_move_time = 5;
            break;

        case 6:
            vecFx32.x    = -num6;
            vecFx32.y    = num7;
            vecFx32.x    = -20480;
            vecFx32.y    = 20480;
            no_move_time = 5;
            break;

        case 7:
            vecFx32.x    = -num6;
            vecFx32.y    = -num7;
            vecFx32.x    = -20480;
            vecFx32.y    = -20480;
            no_move_time = 5;
            break;

        case 8:
            if (num4 > (int)AppMain.g_gmk_bumper_rect[8][2] * 4096)
            {
                vecFx32.x    = 16384;
                no_move_time = 15;
                break;
            }
            if (num4 < (int)AppMain.g_gmk_bumper_rect[8][0] * 4096)
            {
                vecFx32.x    = -16384;
                no_move_time = 15;
                break;
            }
            if (num5 < -num2)
            {
                vecFx32.y = -24576;
                if (num4 < -num1)
                {
                    vecFx32.x -= 12288;
                }
                else if (num4 > num1)
                {
                    vecFx32.x += 12288;
                }
                no_move_time = 5;
                break;
            }
            vecFx32.y = 24576;
            if (num4 < -num1)
            {
                vecFx32.x -= 12288;
            }
            else if (num4 > num1)
            {
                vecFx32.x += 12288;
            }
            no_move_time = 5;
            break;

        case 9:
            if (num5 < (int)AppMain.g_gmk_bumper_rect[9][1] * 4096)
            {
                vecFx32.y    = -24576;
                no_move_time = 5;
                break;
            }
            if (num5 > (int)AppMain.g_gmk_bumper_rect[9][3] * 4096)
            {
                vecFx32.y    = 24576;
                no_move_time = 5;
                break;
            }
            if (num4 < -num1)
            {
                vecFx32.x = -16384;
                if (num5 < -num2)
                {
                    vecFx32.y -= 12288;
                }
                else if (num4 > num1)
                {
                    vecFx32.y += 12288;
                }
                no_move_time = 15;
                break;
            }
            vecFx32.x = 16384;
            if (num5 < -num2)
            {
                vecFx32.y -= 12288;
            }
            else if (num4 > num1)
            {
                vecFx32.y += 12288;
            }
            no_move_time = 15;
            break;
        }
        vecFx32.x = AppMain.MTM_MATH_CLIP(vecFx32.x, -16384, 16384);
        vecFx32.y = AppMain.MTM_MATH_CLIP(vecFx32.y, -24576, 24576);
        if (parentObj2.obj_type == (ushort)1)
        {
            bool flag_no_recover_homing = false;
            if (((int)gmsEnemy3DWork.ene_com.eve_rec.flag & 1) != 0)
            {
                flag_no_recover_homing = true;
            }
            AppMain.GmPlySeqInitPinballAir((AppMain.GMS_PLAYER_WORK)parentObj2, vecFx32.x, vecFx32.y, no_move_time, flag_no_recover_homing);
        }
        else if (parentObj2.obj_type == (ushort)2)
        {
            if (((AppMain.GMS_ENEMY_3D_WORK)parentObj2).ene_com.eve_rec.id != (ushort)316)
            {
                return;
            }
            parentObj2.spd.x     = vecFx32.x;
            parentObj2.spd.y     = vecFx32.y;
            parentObj2.spd_add.x = 0;
            parentObj2.spd_add.y = 0;
            if (AppMain.MTM_MATH_ABS(parentObj2.spd.x) < 256)
            {
                parentObj2.spd.x = 256;
            }
            else if (AppMain.MTM_MATH_ABS(parentObj2.spd.y) < 256)
            {
                parentObj2.spd.y = 256;
            }
        }
        AppMain.GMS_GMK_BUMPER_WORK bumper_work = (AppMain.GMS_GMK_BUMPER_WORK)parentObj1;
        if (!AppMain.gmGmkBumperCheckHitEffect(bumper_work))
        {
            return;
        }
        if (bumper_work.se_handle != null)
        {
            AppMain.GmSoundPlaySE("Casino6", bumper_work.se_handle);
        }
        int efct_cmn_idx = AppMain.g_gmk_bumper_effect_id_flush[type];

        if (efct_cmn_idx != -1)
        {
            AppMain.GMS_EFFECT_3DES_WORK gmsEffect3DesWork = AppMain.GmEfctCmnEsCreate(parentObj1, efct_cmn_idx);
            int num8 = AppMain.g_gmk_bumper_effect_offset_flush[type][0] * 4096;
            int num9 = AppMain.g_gmk_bumper_effect_offset_flush[type][1] * 4096;
            gmsEffect3DesWork.efct_com.obj_work.pos.x = parentObj1.pos.x + num8;
            gmsEffect3DesWork.efct_com.obj_work.pos.y = parentObj1.pos.y + num9;
            gmsEffect3DesWork.efct_com.obj_work.pos.z = 655360;
            gmsEffect3DesWork.efct_com.obj_work.dir.z = parentObj1.dir.z;
        }
        AppMain.GMM_PAD_VIB_SMALL();
    }
    // Token: 0x0600007A RID: 122 RVA: 0x000063E8 File Offset: 0x000045E8
    private static void gmGmkBumperDefFunc(AppMain.OBS_RECT_WORK gimmick_rect, AppMain.OBS_RECT_WORK player_rect)
    {
        AppMain.OBS_OBJECT_WORK   parent_obj        = gimmick_rect.parent_obj;
        AppMain.GMS_ENEMY_3D_WORK gms_ENEMY_3D_WORK = (AppMain.GMS_ENEMY_3D_WORK)parent_obj;
        AppMain.OBS_OBJECT_WORK   parent_obj2       = player_rect.parent_obj;
        if (parent_obj2.holder == null || !(parent_obj2.holder is AppMain.GMS_ENEMY_COM_WORK))
        {
            AppMain.GMS_PLAYER_WORK gms_PLAYER_WORK = (AppMain.GMS_PLAYER_WORK)parent_obj2;
            if (gms_PLAYER_WORK.seq_state == 40)
            {
                return;
            }
        }
        int num  = 32768;
        int num2 = 32768;
        int num3 = -12288;
        int num4 = AppMain.gmGmkBumperCalcType((int)gms_ENEMY_3D_WORK.ene_com.eve_rec.id);

        if (parent_obj2.obj_type == 1 && !AppMain.gmGmkBumperCheckHit(parent_obj.pos, parent_obj2.pos, num4))
        {
            return;
        }
        parent_obj2.dir.z = 0;
        AppMain.VecFx32 vecFx = default(AppMain.VecFx32);
        vecFx.z = 0;
        vecFx.x = parent_obj2.spd.x;
        vecFx.y = parent_obj2.spd.y;
        int num5         = parent_obj2.pos.x - parent_obj.pos.x;
        int num6         = parent_obj2.pos.y + num3 - parent_obj.pos.y;
        int num7         = AppMain.MTM_MATH_ABS(vecFx.x);
        int num8         = AppMain.MTM_MATH_ABS(vecFx.y);
        int no_move_time = 0;

        switch (num4)
        {
        case 0:
            if (num5 > ( int )(AppMain.g_gmk_bumper_rect[0][2] * 4096) + num)
            {
                vecFx.x      = 16384;
                no_move_time = 15;
            }
            else if (num5 < ( int )(AppMain.g_gmk_bumper_rect[0][0] * 4096) - num)
            {
                vecFx.x      = -16384;
                no_move_time = 15;
            }
            else
            {
                vecFx.y = 24576;
                if (num5 < -num)
                {
                    vecFx.x -= 12288;
                }
                else if (num5 > num)
                {
                    vecFx.x += 12288;
                }
                no_move_time = 5;
            }
            break;

        case 1:
            if (num5 > ( int )(AppMain.g_gmk_bumper_rect[1][2] * 4096))
            {
                vecFx.x      = 16384;
                no_move_time = 15;
            }
            else if (num5 < ( int )(AppMain.g_gmk_bumper_rect[1][0] * 4096))
            {
                vecFx.x      = -16384;
                no_move_time = 15;
            }
            else
            {
                vecFx.y = -24576;
                if (num5 < -num)
                {
                    vecFx.x -= 12288;
                }
                else if (num5 > num)
                {
                    vecFx.x += 12288;
                }
                no_move_time = 5;
            }
            break;

        case 2:
            if (num6 < ( int )(AppMain.g_gmk_bumper_rect[2][1] * 4096))
            {
                vecFx.y      = -24576;
                no_move_time = 5;
            }
            else if (num6 > ( int )(AppMain.g_gmk_bumper_rect[2][3] * 4096))
            {
                vecFx.y      = 24576;
                no_move_time = 5;
            }
            else
            {
                vecFx.x = 16384;
                if (num6 < -num2)
                {
                    vecFx.y -= 12288;
                }
                else if (num6 > num2)
                {
                    vecFx.y += 12288;
                }
                no_move_time = 15;
            }
            break;

        case 3:
            if (num6 < ( int )(AppMain.g_gmk_bumper_rect[3][1] * 4096))
            {
                vecFx.y      = -24576;
                no_move_time = 5;
            }
            else if (num6 > ( int )(AppMain.g_gmk_bumper_rect[3][3] * 4096))
            {
                vecFx.y      = 24576;
                no_move_time = 5;
            }
            else
            {
                vecFx.x = -16384;
                if (num6 < -num2)
                {
                    vecFx.y -= 12288;
                }
                else if (num6 > num2)
                {
                    vecFx.y += 12288;
                }
                no_move_time = 15;
            }
            break;

        case 4:
            vecFx.x      = num7;
            vecFx.y      = num8;
            vecFx.x      = 20480;
            vecFx.y      = 20480;
            no_move_time = 5;
            break;

        case 5:
            vecFx.x      = num7;
            vecFx.y      = -num8;
            vecFx.x      = 20480;
            vecFx.y      = -20480;
            no_move_time = 5;
            break;

        case 6:
            vecFx.x      = -num7;
            vecFx.y      = num8;
            vecFx.x      = -20480;
            vecFx.y      = 20480;
            no_move_time = 5;
            break;

        case 7:
            vecFx.x      = -num7;
            vecFx.y      = -num8;
            vecFx.x      = -20480;
            vecFx.y      = -20480;
            no_move_time = 5;
            break;

        case 8:
            if (num5 > ( int )(AppMain.g_gmk_bumper_rect[8][2] * 4096))
            {
                vecFx.x      = 16384;
                no_move_time = 15;
            }
            else if (num5 < ( int )(AppMain.g_gmk_bumper_rect[8][0] * 4096))
            {
                vecFx.x      = -16384;
                no_move_time = 15;
            }
            else if (num6 < -num2)
            {
                vecFx.y = -24576;
                if (num5 < -num)
                {
                    vecFx.x -= 12288;
                }
                else if (num5 > num)
                {
                    vecFx.x += 12288;
                }
                no_move_time = 5;
            }
            else
            {
                vecFx.y = 24576;
                if (num5 < -num)
                {
                    vecFx.x -= 12288;
                }
                else if (num5 > num)
                {
                    vecFx.x += 12288;
                }
                no_move_time = 5;
            }
            break;

        case 9:
            if (num6 < ( int )(AppMain.g_gmk_bumper_rect[9][1] * 4096))
            {
                vecFx.y      = -24576;
                no_move_time = 5;
            }
            else if (num6 > ( int )(AppMain.g_gmk_bumper_rect[9][3] * 4096))
            {
                vecFx.y      = 24576;
                no_move_time = 5;
            }
            else if (num5 < -num)
            {
                vecFx.x = -16384;
                if (num6 < -num2)
                {
                    vecFx.y -= 12288;
                }
                else if (num5 > num)
                {
                    vecFx.y += 12288;
                }
                no_move_time = 15;
            }
            else
            {
                vecFx.x = 16384;
                if (num6 < -num2)
                {
                    vecFx.y -= 12288;
                }
                else if (num5 > num)
                {
                    vecFx.y += 12288;
                }
                no_move_time = 15;
            }
            break;
        }
        vecFx.x = AppMain.MTM_MATH_CLIP(vecFx.x, -16384, 16384);
        vecFx.y = AppMain.MTM_MATH_CLIP(vecFx.y, -24576, 24576);
        if (parent_obj2.obj_type == 1)
        {
            bool flag_no_recover_homing = false;
            if ((gms_ENEMY_3D_WORK.ene_com.eve_rec.flag & 1) != 0)
            {
                flag_no_recover_homing = true;
            }
            AppMain.GmPlySeqInitPinballAir((AppMain.GMS_PLAYER_WORK)parent_obj2, vecFx.x, vecFx.y, no_move_time, flag_no_recover_homing);
        }
        else if (parent_obj2.obj_type == 2)
        {
            AppMain.GMS_ENEMY_3D_WORK gms_ENEMY_3D_WORK2 = (AppMain.GMS_ENEMY_3D_WORK)parent_obj2;
            if (gms_ENEMY_3D_WORK2.ene_com.eve_rec.id != 316)
            {
                return;
            }
            parent_obj2.spd.x     = vecFx.x;
            parent_obj2.spd.y     = vecFx.y;
            parent_obj2.spd_add.x = 0;
            parent_obj2.spd_add.y = 0;
            if (( long )AppMain.MTM_MATH_ABS(parent_obj2.spd.x) < 256L)
            {
                parent_obj2.spd.x = 256;
            }
            else if (( long )AppMain.MTM_MATH_ABS(parent_obj2.spd.y) < 256L)
            {
                parent_obj2.spd.y = 256;
            }
        }
        AppMain.GMS_GMK_BUMPER_WORK gms_GMK_BUMPER_WORK = (AppMain.GMS_GMK_BUMPER_WORK)parent_obj;
        if (AppMain.gmGmkBumperCheckHitEffect(gms_GMK_BUMPER_WORK))
        {
            if (gms_GMK_BUMPER_WORK.se_handle != null)
            {
                AppMain.GmSoundPlaySE("Casino6", gms_GMK_BUMPER_WORK.se_handle);
            }
            int num9 = AppMain.g_gmk_bumper_effect_id_flush[num4];
            if (num9 != -1)
            {
                AppMain.GMS_EFFECT_3DES_WORK gms_EFFECT_3DES_WORK = AppMain.GmEfctCmnEsCreate(parent_obj, num9);
                int num10 = AppMain.g_gmk_bumper_effect_offset_flush[num4][0] * 4096;
                int num11 = AppMain.g_gmk_bumper_effect_offset_flush[num4][1] * 4096;
                gms_EFFECT_3DES_WORK.efct_com.obj_work.pos.x = parent_obj.pos.x + num10;
                gms_EFFECT_3DES_WORK.efct_com.obj_work.pos.y = parent_obj.pos.y + num11;
                gms_EFFECT_3DES_WORK.efct_com.obj_work.pos.z = 655360;
                gms_EFFECT_3DES_WORK.efct_com.obj_work.dir.z = parent_obj.dir.z;
            }
            AppMain.GMM_PAD_VIB_SMALL();
        }
    }