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

📄 m_chick.java

📁 JAKE2用JAVA写的queck2的3D游戏开发引擎
💻 JAVA
📖 第 1 页 / 共 3 页
字号:
    public final static int FRAME_walk25 = 205;    public final static int FRAME_walk26 = 206;    public final static int FRAME_walk27 = 207;    public final static int FRAME_recln201 = 208;    public final static int FRAME_recln202 = 209;    public final static int FRAME_recln203 = 210;    public final static int FRAME_recln204 = 211;    public final static int FRAME_recln205 = 212;    public final static int FRAME_recln206 = 213;    public final static int FRAME_recln207 = 214;    public final static int FRAME_recln208 = 215;    public final static int FRAME_recln209 = 216;    public final static int FRAME_recln210 = 217;    public final static int FRAME_recln211 = 218;    public final static int FRAME_recln212 = 219;    public final static int FRAME_recln213 = 220;    public final static int FRAME_recln214 = 221;    public final static int FRAME_recln215 = 222;    public final static int FRAME_recln216 = 223;    public final static int FRAME_recln217 = 224;    public final static int FRAME_recln218 = 225;    public final static int FRAME_recln219 = 226;    public final static int FRAME_recln220 = 227;    public final static int FRAME_recln221 = 228;    public final static int FRAME_recln222 = 229;    public final static int FRAME_recln223 = 230;    public final static int FRAME_recln224 = 231;    public final static int FRAME_recln225 = 232;    public final static int FRAME_recln226 = 233;    public final static int FRAME_recln227 = 234;    public final static int FRAME_recln228 = 235;    public final static int FRAME_recln229 = 236;    public final static int FRAME_recln230 = 237;    public final static int FRAME_recln231 = 238;    public final static int FRAME_recln232 = 239;    public final static int FRAME_recln233 = 240;    public final static int FRAME_recln234 = 241;    public final static int FRAME_recln235 = 242;    public final static int FRAME_recln236 = 243;    public final static int FRAME_recln237 = 244;    public final static int FRAME_recln238 = 245;    public final static int FRAME_recln239 = 246;    public final static int FRAME_recln240 = 247;    public final static int FRAME_recln101 = 248;    public final static int FRAME_recln102 = 249;    public final static int FRAME_recln103 = 250;    public final static int FRAME_recln104 = 251;    public final static int FRAME_recln105 = 252;    public final static int FRAME_recln106 = 253;    public final static int FRAME_recln107 = 254;    public final static int FRAME_recln108 = 255;    public final static int FRAME_recln109 = 256;    public final static int FRAME_recln110 = 257;    public final static int FRAME_recln111 = 258;    public final static int FRAME_recln112 = 259;    public final static int FRAME_recln113 = 260;    public final static int FRAME_recln114 = 261;    public final static int FRAME_recln115 = 262;    public final static int FRAME_recln116 = 263;    public final static int FRAME_recln117 = 264;    public final static int FRAME_recln118 = 265;    public final static int FRAME_recln119 = 266;    public final static int FRAME_recln120 = 267;    public final static int FRAME_recln121 = 268;    public final static int FRAME_recln122 = 269;    public final static int FRAME_recln123 = 270;    public final static int FRAME_recln124 = 271;    public final static int FRAME_recln125 = 272;    public final static int FRAME_recln126 = 273;    public final static int FRAME_recln127 = 274;    public final static int FRAME_recln128 = 275;    public final static int FRAME_recln129 = 276;    public final static int FRAME_recln130 = 277;    public final static int FRAME_recln131 = 278;    public final static int FRAME_recln132 = 279;    public final static int FRAME_recln133 = 280;    public final static int FRAME_recln134 = 281;    public final static int FRAME_recln135 = 282;    public final static int FRAME_recln136 = 283;    public final static int FRAME_recln137 = 284;    public final static int FRAME_recln138 = 285;    public final static int FRAME_recln139 = 286;    public final static int FRAME_recln140 = 287;    public final static float MODEL_SCALE = 1.000000f;    static int sound_missile_prelaunch;    static int sound_missile_launch;    static int sound_melee_swing;    static int sound_melee_hit;    static int sound_missile_reload;    static int sound_death1;    static int sound_death2;    static int sound_fall_down;    static int sound_idle1;    static int sound_idle2;    static int sound_pain1;    static int sound_pain2;    static int sound_pain3;    static int sound_sight;    static int sound_search;    static EntThinkAdapter ChickMoan = new EntThinkAdapter() {    	public String getID() { return "ChickMoan"; }        public boolean think(edict_t self) {            if (Lib.random() < 0.5)                GameBase.gi.sound(self, Defines.CHAN_VOICE, sound_idle1, 1,                        Defines.ATTN_IDLE, 0);            else                GameBase.gi.sound(self, Defines.CHAN_VOICE, sound_idle2, 1,                        Defines.ATTN_IDLE, 0);            return true;        }    };    static mframe_t chick_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, ChickMoan),            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 EntThinkAdapter chick_stand = new EntThinkAdapter() {    	public String getID() { return "chick_stand"; }        public boolean think(edict_t self) {            self.monsterinfo.currentmove = chick_move_stand;            return true;        }    };    static mmove_t chick_move_fidget = new mmove_t(FRAME_stand201,            FRAME_stand230, chick_frames_fidget, chick_stand);    static EntThinkAdapter chick_fidget = new EntThinkAdapter() {    	public String getID() { return "chick_fidget"; }        public boolean think(edict_t self) {            if ((self.monsterinfo.aiflags & Defines.AI_STAND_GROUND) != 0)                return true;            if (Lib.random() <= 0.3)                self.monsterinfo.currentmove = chick_move_fidget;            return true;        }    };    static mframe_t chick_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),            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, chick_fidget), };    static mmove_t chick_move_stand = new mmove_t(FRAME_stand101,            FRAME_stand130, chick_frames_stand, null);    static EntThinkAdapter chick_run = new EntThinkAdapter() {    	public String getID() { return "chick_run"; }        public boolean think(edict_t self) {            if ((self.monsterinfo.aiflags & Defines.AI_STAND_GROUND) != 0) {                self.monsterinfo.currentmove = chick_move_stand;                return true;            }            if (self.monsterinfo.currentmove == chick_move_walk                    || self.monsterinfo.currentmove == chick_move_start_run) {                self.monsterinfo.currentmove = chick_move_run;            } else {                self.monsterinfo.currentmove = chick_move_start_run;            }            return true;        }    };    static mframe_t chick_frames_start_run[] = new mframe_t[] {            new mframe_t(GameAI.ai_run, 1, null),            new mframe_t(GameAI.ai_run, 0, null),            new mframe_t(GameAI.ai_run, 0, null),            new mframe_t(GameAI.ai_run, -1, null),            new mframe_t(GameAI.ai_run, -1, null),            new mframe_t(GameAI.ai_run, 0, null),            new mframe_t(GameAI.ai_run, 1, null),            new mframe_t(GameAI.ai_run, 3, null),            new mframe_t(GameAI.ai_run, 6, null),            new mframe_t(GameAI.ai_run, 3, null) };    static mmove_t chick_move_start_run = new mmove_t(FRAME_walk01,            FRAME_walk10, chick_frames_start_run, chick_run);    static mframe_t chick_frames_run[] = new mframe_t[] {            new mframe_t(GameAI.ai_run, 6, null),            new mframe_t(GameAI.ai_run, 8, null),            new mframe_t(GameAI.ai_run, 13, null),            new mframe_t(GameAI.ai_run, 5, null),            new mframe_t(GameAI.ai_run, 7, null),            new mframe_t(GameAI.ai_run, 4, null),            new mframe_t(GameAI.ai_run, 11, null),            new mframe_t(GameAI.ai_run, 5, null),            new mframe_t(GameAI.ai_run, 9, null),            new mframe_t(GameAI.ai_run, 7, null) };    static mmove_t chick_move_run = new mmove_t(FRAME_walk11, FRAME_walk20,            chick_frames_run, null);    static mframe_t chick_frames_walk[] = new mframe_t[] {            new mframe_t(GameAI.ai_walk, 6, null),            new mframe_t(GameAI.ai_walk, 8, null),            new mframe_t(GameAI.ai_walk, 13, null),            new mframe_t(GameAI.ai_walk, 5, null),            new mframe_t(GameAI.ai_walk, 7, null),            new mframe_t(GameAI.ai_walk, 4, null),            new mframe_t(GameAI.ai_walk, 11, null),            new mframe_t(GameAI.ai_walk, 5, null),            new mframe_t(GameAI.ai_walk, 9, null),            new mframe_t(GameAI.ai_walk, 7, null) };    static mmove_t chick_move_walk = new mmove_t(FRAME_walk11, FRAME_walk20,            chick_frames_walk, null);    static EntThinkAdapter chick_walk = new EntThinkAdapter() {    	public String getID() { return "chick_walk"; }        public boolean think(edict_t self) {            self.monsterinfo.currentmove = chick_move_walk;            return true;        }    };    static mframe_t chick_frames_pain1[] = 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) };    static mmove_t chick_move_pain1 = new mmove_t(FRAME_pain101, FRAME_pain105,            chick_frames_pain1, chick_run);    static mframe_t chick_frames_pain2[] = 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) };    static mmove_t chick_move_pain2 = new mmove_t(FRAME_pain201, FRAME_pain205,            chick_frames_pain2, chick_run);    static mframe_t chick_frames_pain3[] = 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, -6, null),            new mframe_t(GameAI.ai_move, 3, null),            new mframe_t(GameAI.ai_move, 11, null),            new mframe_t(GameAI.ai_move, 3, null),            new mframe_t(GameAI.ai_move, 0, null),            new mframe_t(GameAI.ai_move, 0, null),            new mframe_t(GameAI.ai_move, 4, null),            new mframe_t(GameAI.ai_move, 1, null),            new mframe_t(GameAI.ai_move, 0, null),            new mframe_t(GameAI.ai_move, -3, null),            new mframe_t(GameAI.ai_move, -4, null),            new mframe_t(GameAI.ai_move, 5, null),            new mframe_t(GameAI.ai_move, 7, null),            new mframe_t(GameAI.ai_move, -2, null),            new mframe_t(GameAI.ai_move, 3, null),            new mframe_t(GameAI.ai_move, -5, null),            new mframe_t(GameAI.ai_move, -2, null),            new mframe_t(GameAI.ai_move, -8, null),            new mframe_t(GameAI.ai_move, 2, null) };    static mmove_t chick_move_pain3 = new mmove_t(FRAME_pain301, FRAME_pain321,            chick_frames_pain3, chick_run);    static EntPainAdapter chick_pain = new EntPainAdapter() {    	public String getID() { return "chick_pain"; }        public void pain(edict_t self, edict_t other, float kick, int damage) {            float r;            if (self.health < (self.max_health / 2))                self.s.skinnum = 1;            if (GameBase.level.time < self.pain_debounce_time)                return;            self.pain_debounce_time = GameBase.level.time + 3;            r = Lib.random();            if (r < 0.33)                GameBase.gi.sound(self, Defines.CHAN_VOICE, sound_pain1, 1,                        Defines.ATTN_NORM, 0);            else if (r < 0.66)                GameBase.gi.sound(self, Defines.CHAN_VOICE, sound_pain2, 1,                        Defines.ATTN_NORM, 0);            else                GameBase.gi.sound(self, Defines.CHAN_VOICE, sound_pain3, 1,                        Defines.ATTN_NORM, 0);            if (GameBase.skill.value == 3)                return; // no pain anims in nightmare

⌨️ 快捷键说明

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