⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 m_boss2.java

📁 JAKE2用JAVA写的queck2的3D游戏开发引擎
💻 JAVA
📖 第 1 页 / 共 3 页
字号:
                    0, 0 };            float[] start = { 0, 0, 0 };            Math3D.AngleVectors(self.s.angles, forward, right, null);            Math3D                    .G_ProjectSource(                            self.s.origin,                            M_Flash.monster_flash_offset[Defines.MZ2_BOSS2_MACHINEGUN_L1],                            forward, right, start);            Math3D.VectorMA(self.enemy.s.origin, -0.2f, self.enemy.velocity,                    target);            target[2] += self.enemy.viewheight;            Math3D.VectorSubtract(target, start, forward);            Math3D.VectorNormalize(forward);            Monster.monster_fire_bullet(self, start, forward, 6, 4,                    Defines.DEFAULT_BULLET_HSPREAD,                    Defines.DEFAULT_BULLET_VSPREAD,                    Defines.MZ2_BOSS2_MACHINEGUN_L1);            return true;        }    };    static EntThinkAdapter Boss2MachineGun = new EntThinkAdapter() {    	public String getID() { return "Boss2MachineGun"; }        public boolean think(edict_t self) {            /*             * RST: this was disabled ! float[] forward={0,0,0}, right={0,0,0};             * float[] start={0,0,0}; float[] dir={0,0,0}; float[] vec={0,0,0};             * int flash_number;             *              * AngleVectors (self.s.angles, forward, right, null);             *              * flash_number = MZ2_BOSS2_MACHINEGUN_1 + (self.s.frame -             * FRAME_attack10); G_ProjectSource (self.s.origin,             * monster_flash_offset[flash_number], forward, right, start);             *              * VectorCopy (self.enemy.s.origin, vec); vec[2] +=             * self.enemy.viewheight; VectorSubtract (vec, start, dir);             * VectorNormalize (dir); monster_fire_bullet (self, start, dir, 3,             * 4, DEFAULT_BULLET_HSPREAD, DEFAULT_BULLET_VSPREAD, flash_number);             */            boss2_firebullet_left.think(self);            boss2_firebullet_right.think(self);            return true;        }    };    static mframe_t boss2_frames_stand[] = new mframe_t[] {            new mframe_t(GameAI.ai_stand, 0, null),            new mframe_t(GameAI.ai_stand, 0, null),            new mframe_t(GameAI.ai_stand, 0, null),            new mframe_t(GameAI.ai_stand, 0, null),            new mframe_t(GameAI.ai_stand, 0, null),            new mframe_t(GameAI.ai_stand, 0, null),            new mframe_t(GameAI.ai_stand, 0, null),            new mframe_t(GameAI.ai_stand, 0, null),            new mframe_t(GameAI.ai_stand, 0, null),            new mframe_t(GameAI.ai_stand, 0, null),            new mframe_t(GameAI.ai_stand, 0, null),            new mframe_t(GameAI.ai_stand, 0, null),            new mframe_t(GameAI.ai_stand, 0, null),            new mframe_t(GameAI.ai_stand, 0, null),            new mframe_t(GameAI.ai_stand, 0, null),            new mframe_t(GameAI.ai_stand, 0, null),            new mframe_t(GameAI.ai_stand, 0, null),            new mframe_t(GameAI.ai_stand, 0, null),            new mframe_t(GameAI.ai_stand, 0, null),            new mframe_t(GameAI.ai_stand, 0, null),            new mframe_t(GameAI.ai_stand, 0, null) };    static mmove_t boss2_move_stand = new mmove_t(FRAME_stand30, FRAME_stand50,            boss2_frames_stand, null);    static mframe_t boss2_frames_fidget[] = new mframe_t[] {            new mframe_t(GameAI.ai_stand, 0, null),            new mframe_t(GameAI.ai_stand, 0, null),            new mframe_t(GameAI.ai_stand, 0, null),            new mframe_t(GameAI.ai_stand, 0, null),            new mframe_t(GameAI.ai_stand, 0, null),            new mframe_t(GameAI.ai_stand, 0, null),            new mframe_t(GameAI.ai_stand, 0, null),            new mframe_t(GameAI.ai_stand, 0, null),            new mframe_t(GameAI.ai_stand, 0, null),            new mframe_t(GameAI.ai_stand, 0, null),            new mframe_t(GameAI.ai_stand, 0, null),            new mframe_t(GameAI.ai_stand, 0, null),            new mframe_t(GameAI.ai_stand, 0, null),            new mframe_t(GameAI.ai_stand, 0, null),            new mframe_t(GameAI.ai_stand, 0, null),            new mframe_t(GameAI.ai_stand, 0, null),            new mframe_t(GameAI.ai_stand, 0, null),            new mframe_t(GameAI.ai_stand, 0, null),            new mframe_t(GameAI.ai_stand, 0, null),            new mframe_t(GameAI.ai_stand, 0, null),            new mframe_t(GameAI.ai_stand, 0, null),            new mframe_t(GameAI.ai_stand, 0, null),            new mframe_t(GameAI.ai_stand, 0, null),            new mframe_t(GameAI.ai_stand, 0, null),            new mframe_t(GameAI.ai_stand, 0, null),            new mframe_t(GameAI.ai_stand, 0, null),            new mframe_t(GameAI.ai_stand, 0, null),            new mframe_t(GameAI.ai_stand, 0, null),            new mframe_t(GameAI.ai_stand, 0, null),            new mframe_t(GameAI.ai_stand, 0, null) };    static mmove_t boss2_move_fidget = new mmove_t(FRAME_stand1, FRAME_stand30,            boss2_frames_fidget, null);    static mframe_t boss2_frames_walk[] = new mframe_t[] {            new mframe_t(GameAI.ai_walk, 8, null),            new mframe_t(GameAI.ai_walk, 8, null),            new mframe_t(GameAI.ai_walk, 8, null),            new mframe_t(GameAI.ai_walk, 8, null),            new mframe_t(GameAI.ai_walk, 8, null),            new mframe_t(GameAI.ai_walk, 8, null),            new mframe_t(GameAI.ai_walk, 8, null),            new mframe_t(GameAI.ai_walk, 8, null),            new mframe_t(GameAI.ai_walk, 8, null),            new mframe_t(GameAI.ai_walk, 8, null),            new mframe_t(GameAI.ai_walk, 8, null),            new mframe_t(GameAI.ai_walk, 8, null),            new mframe_t(GameAI.ai_walk, 8, null),            new mframe_t(GameAI.ai_walk, 8, null),            new mframe_t(GameAI.ai_walk, 8, null),            new mframe_t(GameAI.ai_walk, 8, null),            new mframe_t(GameAI.ai_walk, 8, null),            new mframe_t(GameAI.ai_walk, 8, null),            new mframe_t(GameAI.ai_walk, 8, null),            new mframe_t(GameAI.ai_walk, 8, null) };    static mmove_t boss2_move_walk = new mmove_t(FRAME_walk1, FRAME_walk20,            boss2_frames_walk, null);    static mframe_t boss2_frames_run[] = new mframe_t[] {            new mframe_t(GameAI.ai_run, 8, null),            new mframe_t(GameAI.ai_run, 8, null),            new mframe_t(GameAI.ai_run, 8, null),            new mframe_t(GameAI.ai_run, 8, null),            new mframe_t(GameAI.ai_run, 8, null),            new mframe_t(GameAI.ai_run, 8, null),            new mframe_t(GameAI.ai_run, 8, null),            new mframe_t(GameAI.ai_run, 8, null),            new mframe_t(GameAI.ai_run, 8, null),            new mframe_t(GameAI.ai_run, 8, null),            new mframe_t(GameAI.ai_run, 8, null),            new mframe_t(GameAI.ai_run, 8, null),            new mframe_t(GameAI.ai_run, 8, null),            new mframe_t(GameAI.ai_run, 8, null),            new mframe_t(GameAI.ai_run, 8, null),            new mframe_t(GameAI.ai_run, 8, null),            new mframe_t(GameAI.ai_run, 8, null),            new mframe_t(GameAI.ai_run, 8, null),            new mframe_t(GameAI.ai_run, 8, null),            new mframe_t(GameAI.ai_run, 8, null) };    static mmove_t boss2_move_run = new mmove_t(FRAME_walk1, FRAME_walk20,            boss2_frames_run, null);    static mframe_t boss2_frames_attack_pre_mg[] = new mframe_t[] {            new mframe_t(GameAI.ai_charge, 1, null),            new mframe_t(GameAI.ai_charge, 1, null),            new mframe_t(GameAI.ai_charge, 1, null),            new mframe_t(GameAI.ai_charge, 1, null),            new mframe_t(GameAI.ai_charge, 1, null),            new mframe_t(GameAI.ai_charge, 1, null),            new mframe_t(GameAI.ai_charge, 1, null),            new mframe_t(GameAI.ai_charge, 1, null),            new mframe_t(GameAI.ai_charge, 1, boss2_attack_mg) };    static mmove_t boss2_move_attack_pre_mg = new mmove_t(FRAME_attack1,            FRAME_attack9, boss2_frames_attack_pre_mg, null);    //	   Loop this    static mframe_t boss2_frames_attack_mg[] = new mframe_t[] {            new mframe_t(GameAI.ai_charge, 1, Boss2MachineGun),            new mframe_t(GameAI.ai_charge, 1, Boss2MachineGun),            new mframe_t(GameAI.ai_charge, 1, Boss2MachineGun),            new mframe_t(GameAI.ai_charge, 1, Boss2MachineGun),            new mframe_t(GameAI.ai_charge, 1, Boss2MachineGun),            new mframe_t(GameAI.ai_charge, 1, boss2_reattack_mg) };    static mmove_t boss2_move_attack_mg = new mmove_t(FRAME_attack10,            FRAME_attack15, boss2_frames_attack_mg, null);    static mframe_t boss2_frames_attack_post_mg[] = new mframe_t[] {            new mframe_t(GameAI.ai_charge, 1, null),            new mframe_t(GameAI.ai_charge, 1, null),            new mframe_t(GameAI.ai_charge, 1, null),            new mframe_t(GameAI.ai_charge, 1, null) };    static mmove_t boss2_move_attack_post_mg = new mmove_t(FRAME_attack16,            FRAME_attack19, boss2_frames_attack_post_mg, boss2_run);    static mframe_t boss2_frames_attack_rocket[] = new mframe_t[] {            new mframe_t(GameAI.ai_charge, 1, null),            new mframe_t(GameAI.ai_charge, 1, null),            new mframe_t(GameAI.ai_charge, 1, null),            new mframe_t(GameAI.ai_charge, 1, null),            new mframe_t(GameAI.ai_charge, 1, null),            new mframe_t(GameAI.ai_charge, 1, null),            new mframe_t(GameAI.ai_charge, 1, null),            new mframe_t(GameAI.ai_charge, 1, null),            new mframe_t(GameAI.ai_charge, 1, null),            new mframe_t(GameAI.ai_charge, 1, null),            new mframe_t(GameAI.ai_charge, 1, null),            new mframe_t(GameAI.ai_charge, 1, null),            new mframe_t(GameAI.ai_move, -20, Boss2Rocket),            new mframe_t(GameAI.ai_charge, 1, null),            new mframe_t(GameAI.ai_charge, 1, null),            new mframe_t(GameAI.ai_charge, 1, null),            new mframe_t(GameAI.ai_charge, 1, null),            new mframe_t(GameAI.ai_charge, 1, null),            new mframe_t(GameAI.ai_charge, 1, null),            new mframe_t(GameAI.ai_charge, 1, null),            new mframe_t(GameAI.ai_charge, 1, null) };    static mmove_t boss2_move_attack_rocket = new mmove_t(FRAME_attack20,            FRAME_attack40, boss2_frames_attack_rocket, boss2_run);    static mframe_t boss2_frames_pain_heavy[] = new mframe_t[] {            new mframe_t(GameAI.ai_move, 0, null),            new mframe_t(GameAI.ai_move, 0, null),            new mframe_t(GameAI.ai_move, 0, null),            new mframe_t(GameAI.ai_move, 0, null),            new mframe_t(GameAI.ai_move, 0, null),            new mframe_t(GameAI.ai_move, 0, null),            new mframe_t(GameAI.ai_move, 0, null),            new mframe_t(GameAI.ai_move, 0, null),            new mframe_t(GameAI.ai_move, 0, null),            new mframe_t(GameAI.ai_move, 0, null),            new mframe_t(GameAI.ai_move, 0, null),            new mframe_t(GameAI.ai_move, 0, null),            new mframe_t(GameAI.ai_move, 0, null),            new mframe_t(GameAI.ai_move, 0, null),            new mframe_t(GameAI.ai_move, 0, null),            new mframe_t(GameAI.ai_move, 0, null),            new mframe_t(GameAI.ai_move, 0, null),            new mframe_t(GameAI.ai_move, 0, null) };    static mmove_t boss2_move_pain_heavy = new mmove_t(FRAME_pain2,            FRAME_pain19, boss2_frames_pain_heavy, boss2_run);    static mframe_t boss2_frames_pain_light[] = new mframe_t[] {            new mframe_t(GameAI.ai_move, 0, null),            new mframe_t(GameAI.ai_move, 0, null),            new mframe_t(GameAI.ai_move, 0, null),            new mframe_t(GameAI.ai_move, 0, null) };    static mmove_t boss2_move_pain_light = new mmove_t(FRAME_pain20,            FRAME_pain23, boss2_frames_pain_light, boss2_run);    static mframe_t boss2_frames_death[] = new mframe_t[] {            new mframe_t(GameAI.ai_move, 0, null),            new mframe_t(GameAI.ai_move, 0, null),            new mframe_t(GameAI.ai_move, 0, null),            new mframe_t(GameAI.ai_move, 0, null),            new mframe_t(GameAI.ai_move, 0, null),            new mframe_t(GameAI.ai_move, 0, null),            new mframe_t(GameAI.ai_move, 0, null),            new mframe_t(GameAI.ai_move, 0, null),            new mframe_t(GameAI.ai_move, 0, null),            new mframe_t(GameAI.ai_move, 0, null),            new mframe_t(GameAI.ai_move, 0, null),            new mframe_t(GameAI.ai_move, 0, null),            new mframe_t(GameAI.ai_move, 0, null),            new mframe_t(GameAI.ai_move, 0, null),            new mframe_t(GameAI.ai_move, 0, null),            new mframe_t(GameAI.ai_move, 0, null),            new mframe_t(GameAI.ai_move, 0, null),            new mframe_t(GameAI.ai_move, 0, null),            new mframe_t(GameAI.ai_move, 0, null),            new mframe_t(GameAI.ai_move, 0, null),            new mframe_t(GameAI.ai_move, 0, null),            new mframe_t(GameAI.ai_move, 0, null),            new mframe_t(GameAI.ai_move, 0, null),            new mframe_t(GameAI.ai_move, 0, null),            new mframe_t(GameAI.ai_move, 0, null),            new mframe_t(GameAI.ai_move, 0, null),            new mframe_t(GameAI.ai_move, 0, null),            new mframe_t(GameAI.ai_move, 0, null),            new mframe_t(GameAI.ai_move, 0, null),            new mframe_t(GameAI.ai_move, 0, null),            new mframe_t(GameAI.ai_move, 0, null),            new mframe_t(GameAI.ai_move, 0, null),            new mframe_t(GameAI.ai_move, 0, null),            new mframe_t(GameAI.ai_move, 0, null),            new mframe_t(GameAI.ai_move, 0, null),            new mframe_t(GameAI.ai_move, 0, null),            new mframe_t(GameAI.ai_move, 0, null),            new mframe_t(GameAI.ai_move, 0, null),            new mframe_t(GameAI.ai_move, 0, null),            new mframe_t(GameAI.ai_move, 0, null),            new mframe_t(GameAI.ai_move, 0, null),            new mframe_t(GameAI.ai_move, 0, null),            new mframe_t(GameAI.ai_move, 0, null),            new mframe_t(GameAI.ai_move, 0, null),            new mframe_t(GameAI.ai_move, 0, null),            new mframe_t(GameAI.ai_move, 0, null),            new mframe_t(GameAI.ai_move, 0, null),            new mframe_t(GameAI.ai_move, 0, null),            new mframe_t(GameAI.ai_move, 0, M_Supertank.BossExplode) };    /*     * static EntThinkAdapter xxx = new EntThinkAdapter() { public boolean     * think(edict_t self) { return true; } };     */    static mmove_t boss2_move_death = new mmove_t(FRAME_death2, FRAME_death50,            boss2_frames_death, boss2_dead);    /*     * QUAKED monster_boss2 (1 .5 0) (-56 -56 0) (56 56 80) Ambush Trigger_Spawn     * Sight     */    public static void SP_monster_boss2(edict_t self) {        if (GameBase.deathmatch.value != 0) {            GameUtil.G_FreeEdict(self);            return;        }        sound_pain1 = GameBase.gi.soundindex("bosshovr/bhvpain1.wav");        sound_pain2 = GameBase.gi.soundindex("bosshovr/bhvpain2.wav");        sound_pain3 = GameBase.gi.soundindex("bosshovr/bhvpain3.wav");        sound_death = GameBase.gi.soundindex("bosshovr/bhvdeth1.wav");        sound_search1 = GameBase.gi.soundindex("bosshovr/bhvunqv1.wav");        self.s.sound = GameBase.gi.soundindex("bosshovr/bhvengn1.wav");        self.movetype = Defines.MOVETYPE_STEP;        self.solid = Defines.SOLID_BBOX;        self.s.modelindex = GameBase.gi                .modelindex("models/monsters/boss2/tris.md2");        Math3D.VectorSet(self.mins, -56, -56, 0);        Math3D.VectorSet(self.maxs, 56, 56, 80);        self.health = 2000;        self.gib_health = -200;        self.mass = 1000;        self.flags |= Defines.FL_IMMUNE_LASER;        self.pain = boss2_pain;        self.die = boss2_die;        self.monsterinfo.stand = boss2_stand;        self.monsterinfo.walk = boss2_walk;        self.monsterinfo.run = boss2_run;        self.monsterinfo.attack = boss2_attack;        self.monsterinfo.search = boss2_search;        self.monsterinfo.checkattack = Boss2_CheckAttack;        GameBase.gi.linkentity(self);        self.monsterinfo.currentmove = boss2_move_stand;        self.monsterinfo.scale = MODEL_SCALE;        GameAI.flymonster_start.think(self);    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -