// Token: 0x06000503 RID: 1283 RVA: 0x0002B160 File Offset: 0x00029360
    private static void gmBoss5LdPartInitFall(AppMain.GMS_BOSS5_LDPART_WORK ldpart_work)
    {
        OBS_OBJECT_WORK obs_OBJECT_WORK = AppMain.GMM_BS_OBJ(ldpart_work);
        int             num             = (int)AppMain.mtMathRand() % AppMain.GMD_BOSS5_LAND_LDPART_FALL_XY_DIR_RANGE_DEG;
        int             ang             = AkMath.DEGtoA32(num + (270 - AppMain.GMD_BOSS5_LAND_LDPART_FALL_XY_DIR_RANGE_DEG / 2));
        int             z = AppMain.FX_Mul(AkMath.RandFx(), AppMain.GMD_BOSS5_LAND_LDPART_FALL_Z_SPD_MAX * 2) - AppMain.GMD_BOSS5_LAND_LDPART_FALL_Z_SPD_MAX;

        obs_OBJECT_WORK.spd.y      = ( int )(4096f * AppMain.GMD_BOSS5_LAND_LDPART_FALL_XY_SPD_FL * AppMain.nnSin(ang));
        obs_OBJECT_WORK.spd.x      = ( int )(4096f * AppMain.GMD_BOSS5_LAND_LDPART_FALL_XY_SPD_FL * AppMain.nnCos(ang));
        obs_OBJECT_WORK.spd.z      = z;
        obs_OBJECT_WORK.flag      &= 4294966271U;
        obs_OBJECT_WORK.move_flag |= 128U;
    }
Beispiel #2
0
    // Token: 0x0600103D RID: 4157 RVA: 0x0008D5A0 File Offset: 0x0008B7A0
    public static void gmEneMoguWalkMain(OBS_OBJECT_WORK obj_work)
    {
        GMS_PLAYER_WORK gms_PLAYER_WORK = AppMain.g_gm_main_system.ply_work[(int)((UIntPtr)0)];

        AppMain.GMS_ENE_MOGU_WORK gms_ENE_MOGU_WORK = (AppMain.GMS_ENE_MOGU_WORK)obj_work;
        AppMain.gmEneMoguCheckWater(gms_ENE_MOGU_WORK, 0);
        int num  = gms_PLAYER_WORK.obj_work.pos.x - obj_work.pos.x;
        int num2 = gms_PLAYER_WORK.obj_work.pos.y - obj_work.pos.y;
        int num3 = AppMain.FX_Mul(num, num) + AppMain.FX_Mul(num2, num2);

        AppMain.GMS_ENEMY_COM_WORK gms_ENEMY_COM_WORK = (AppMain.GMS_ENEMY_COM_WORK)obj_work;
        if ((gms_ENEMY_COM_WORK.eve_rec.flag & 2) != 0)
        {
            num3 = AppMain.FX_F32_TO_FX32(6400f) + 1;
            gms_ENE_MOGU_WORK.wait_time = 216000;
        }
        if (num3 <= AppMain.FX_F32_TO_FX32(6400f))
        {
            gms_ENE_MOGU_WORK.wait_time = 0;
            if ((obj_work.disp_flag & 1U) != 0U)
            {
                if (AppMain.GmEneComTargetIsLeft(obj_work, gms_PLAYER_WORK.obj_work) == 0)
                {
                    AppMain.gmEneMoguFlipInit(obj_work);
                }
            }
            else if (AppMain.GmEneComTargetIsLeft(obj_work, gms_PLAYER_WORK.obj_work) != 0)
            {
                AppMain.gmEneMoguFlipInit(obj_work);
            }
            if ((obj_work.move_flag & 4U) != 0U)
            {
                AppMain.gmEneMoguJumpInit(obj_work);
            }
            return;
        }
        if (gms_ENE_MOGU_WORK.wait_time > 0)
        {
            gms_ENE_MOGU_WORK.wait_time--;
            if ((obj_work.move_flag & 4U) != 0U)
            {
                AppMain.gmEneMoguJumpInit(obj_work);
            }
            return;
        }
        if (AkMath.RandFx() > AppMain.FX_F32_TO_FX32(0.5f))
        {
            AppMain.gmEneMoguFlipInit(obj_work);
        }
        gms_ENE_MOGU_WORK.wait_time = 216000;
    }
Beispiel #3
0
    // Token: 0x060002B1 RID: 689 RVA: 0x000169AC File Offset: 0x00014BAC
    private static void GmBoss4EffBombUpdateCreate(AppMain.GMS_BOSS4_EFF_BOMB_WORK bomb_work)
    {
        AppMain.MTM_ASSERT(bomb_work.parent_obj);
        bomb_work.pos[0] += AppMain.GmBoss4GetScrollOffset();
        if (bomb_work.interval_timer != 0U)
        {
            bomb_work.interval_timer -= 1U;
            return;
        }
        int num       = bomb_work.area[0];
        int num2      = bomb_work.area[1];
        int num3      = AppMain.FX_Mul(AkMath.RandFx(), num);
        int num4      = AppMain.FX_Mul(AkMath.RandFx(), num2);
        int bomb_type = bomb_work.bomb_type;

        AppMain.GMS_EFFECT_3DES_WORK gms_EFFECT_3DES_WORK;
        if (bomb_type != 0)
        {
            if (bomb_type != 5)
            {
                AppMain.MTM_ASSERT(false);
                return;
            }
            gms_EFFECT_3DES_WORK = AppMain.GmBoss4EffCommonInit(743, default(AppMain.VecFx32? ));
            gms_EFFECT_3DES_WORK.efct_com.obj_work.ppFunc = null;
            AppMain.GmEffect3DESSetupBase(gms_EFFECT_3DES_WORK, 2U, 64U);
            gms_EFFECT_3DES_WORK.efct_com.obj_work.ppFunc = AppMain.gmBoss4EffMainFuncDeleteAtEnd;
        }
        else
        {
            gms_EFFECT_3DES_WORK = AppMain.GmEfctCmnEsCreate(null, 7);
            gms_EFFECT_3DES_WORK.efct_com.obj_work.ppFunc = null;
            AppMain.GmEffect3DESSetupBase(gms_EFFECT_3DES_WORK, 2U, 1U);
            gms_EFFECT_3DES_WORK.efct_com.obj_work.ppFunc = AppMain.gmBoss4EffMainFuncDeleteAtEnd;
            if (--bomb_work.interval_timer_sound <= 0)
            {
                bomb_work.interval_timer_sound = 3;
                GmSound.PlaySE("Boss0_02");
            }
        }
        OBS_OBJECT_WORK obs_OBJECT_WORK = AppMain.GMM_BS_OBJ(gms_EFFECT_3DES_WORK);

        AppMain.MTM_ASSERT(obs_OBJECT_WORK);
        obs_OBJECT_WORK.pos.x = bomb_work.pos[0] - (num >> 1) + num3;
        obs_OBJECT_WORK.pos.y = bomb_work.pos[1] - (num2 >> 1) + num4;
        obs_OBJECT_WORK.pos.z = AppMain.GMM_BS_OBJ(bomb_work.parent_obj).pos.z + 131072;
        uint num5 = (uint)((long)AkMath.RandFx() * (long)((ulong)(bomb_work.interval_max - bomb_work.interval_max)) >> 12);

        bomb_work.interval_timer = bomb_work.interval_min + num5;
    }
    // Token: 0x06000501 RID: 1281 RVA: 0x0002B054 File Offset: 0x00029254
    private static void gmBoss5LdPartInitSpin(AppMain.GMS_BOSS5_LDPART_WORK ldpart_work)
    {
        AppMain.nnMakeUnitQuaternion(ref ldpart_work.cur_rot_quat);
        AppMain.nnMakeUnitQuaternion(ref ldpart_work.rot_diff_quat);
        int num = 0;

        while (( long )num < ( long )(( ulong )AppMain.GMD_BOSS5_LAND_LDPART_SPIN_ROT_AXIS_NUM))
        {
            NNS_VECTOR nns_VECTOR = GlobalPool <NNS_VECTOR> .Alloc();

            float num2 = AppMain.FX_FX32_TO_F32(AkMath.RandFx()) * 2f - 1f;
            num2 = AppMain.MTM_MATH_CLIP(num2, -1f, 1f);
            short rand_angle = AkMath.DEGtoA16(360f * AppMain.FX_FX32_TO_F32(AkMath.RandFx()));
            AkMath.GetRandomUnitVector(nns_VECTOR, num2, rand_angle);
            NNS_QUATERNION nns_QUATERNION;
            AppMain.nnMakeRotateAxisQuaternion(out nns_QUATERNION, nns_VECTOR.x, nns_VECTOR.y, nns_VECTOR.z, AppMain.GMD_BOSS5_LAND_LDPART_SPIN_ROT_SPD_DEG);
            AppMain.nnMultiplyQuaternion(ref ldpart_work.rot_diff_quat, ref nns_QUATERNION, ref ldpart_work.rot_diff_quat);
            num++;
        }
    }