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

📄 m_parasite.java

📁 JAKE2用JAVA写的queck2的3D游戏开发引擎
💻 JAVA
📖 第 1 页 / 共 3 页
字号:
    static int sound_suck;    static int sound_reelin;    static int sound_sight;    static int sound_tap;    static int sound_scratch;    static int sound_search;    static EntThinkAdapter parasite_launch = new EntThinkAdapter() {    	public String getID(){ return "parasite_launch"; }        public boolean think(edict_t self) {            GameBase.gi.sound(self, Defines.CHAN_WEAPON, sound_launch, 1,                    Defines.ATTN_NORM, 0);            return true;        }    };    static EntThinkAdapter parasite_reel_in = new EntThinkAdapter() {    	public String getID(){ return "parasite_reel_in"; }        public boolean think(edict_t self) {            GameBase.gi.sound(self, Defines.CHAN_WEAPON, sound_reelin, 1,                    Defines.ATTN_NORM, 0);            return true;        }    };    static EntInteractAdapter parasite_sight = new EntInteractAdapter() {    	public String getID(){ return "parasite_sight"; }        public boolean interact(edict_t self, edict_t other) {            GameBase.gi.sound(self, Defines.CHAN_WEAPON, sound_sight, 1,                    Defines.ATTN_NORM, 0);            return true;        }    };    static EntThinkAdapter parasite_tap = new EntThinkAdapter() {    	public String getID(){ return "parasite_tap"; }        public boolean think(edict_t self) {            GameBase.gi.sound(self, Defines.CHAN_WEAPON, sound_tap, 1,                    Defines.ATTN_IDLE, 0);            return true;        }    };    static EntThinkAdapter parasite_scratch = new EntThinkAdapter() {    	public String getID(){ return "parasite_scratch"; }        public boolean think(edict_t self) {            GameBase.gi.sound(self, Defines.CHAN_WEAPON, sound_scratch, 1,                    Defines.ATTN_IDLE, 0);            return true;        }    };    static EntThinkAdapter parasite_search = new EntThinkAdapter() {    	public String getID(){ return "parasite_search"; }        public boolean think(edict_t self) {            GameBase.gi.sound(self, Defines.CHAN_WEAPON, sound_search, 1,                    Defines.ATTN_IDLE, 0);            return true;        }    };    static EntThinkAdapter parasite_start_walk = new EntThinkAdapter() {    	public String getID(){ return "parasite_start_walk"; }        public boolean think(edict_t self) {            self.monsterinfo.currentmove = parasite_move_start_walk;            return true;        }    };    static EntThinkAdapter parasite_walk = new EntThinkAdapter() {    	public String getID(){ return "parasite_walk"; }        public boolean think(edict_t self) {            self.monsterinfo.currentmove = parasite_move_walk;            return true;        }    };    static EntThinkAdapter parasite_stand = new EntThinkAdapter() {    	public String getID(){ return "parasite_stand"; }        public boolean think(edict_t self) {            self.monsterinfo.currentmove = parasite_move_stand;            return true;        }    };    static EntThinkAdapter parasite_end_fidget = new EntThinkAdapter() {    	public String getID(){ return "parasite_end_fidget"; }        public boolean think(edict_t self) {            self.monsterinfo.currentmove = parasite_move_end_fidget;            return true;        }    };    static EntThinkAdapter parasite_do_fidget = new EntThinkAdapter() {    	public String getID(){ return "parasite_do_fidget"; }        public boolean think(edict_t self) {            self.monsterinfo.currentmove = parasite_move_fidget;            return true;        }    };    static EntThinkAdapter parasite_refidget = new EntThinkAdapter() {    	public String getID(){ return "parasite_refidget"; }        public boolean think(edict_t self) {            if (Lib.random() <= 0.8)                self.monsterinfo.currentmove = parasite_move_fidget;            else                self.monsterinfo.currentmove = parasite_move_end_fidget;            return true;        }    };    static EntThinkAdapter parasite_idle = new EntThinkAdapter() {    	public String getID(){ return "parasite_idle"; }        public boolean think(edict_t self) {            self.monsterinfo.currentmove = parasite_move_start_fidget;            return true;        }    };    static EntThinkAdapter parasite_start_run = new EntThinkAdapter() {    	public String getID(){ return "parasite_start_run"; }        public boolean think(edict_t self) {            if ((self.monsterinfo.aiflags & Defines.AI_STAND_GROUND) != 0)                self.monsterinfo.currentmove = parasite_move_stand;            else                self.monsterinfo.currentmove = parasite_move_start_run;            return true;        }    };    static EntThinkAdapter parasite_run = new EntThinkAdapter() {    	public String getID(){ return "parasite_run"; }        public boolean think(edict_t self) {            if ((self.monsterinfo.aiflags & Defines.AI_STAND_GROUND) != 0)                self.monsterinfo.currentmove = parasite_move_stand;            else                self.monsterinfo.currentmove = parasite_move_run;            return true;        }    };    static mframe_t parasite_frames_start_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) };    static mmove_t parasite_move_start_fidget = new mmove_t(FRAME_stand18,            FRAME_stand21, parasite_frames_start_fidget, parasite_do_fidget);    static mframe_t parasite_frames_fidget[] = new mframe_t[] {            new mframe_t(GameAI.ai_stand, 0, parasite_scratch),            new mframe_t(GameAI.ai_stand, 0, null),            new mframe_t(GameAI.ai_stand, 0, null),            new mframe_t(GameAI.ai_stand, 0, parasite_scratch),            new mframe_t(GameAI.ai_stand, 0, null),            new mframe_t(GameAI.ai_stand, 0, null) };    static mmove_t parasite_move_fidget = new mmove_t(FRAME_stand22,            FRAME_stand27, parasite_frames_fidget, parasite_refidget);    static mframe_t parasite_frames_end_fidget[] = new mframe_t[] {            new mframe_t(GameAI.ai_stand, 0, parasite_scratch),            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 parasite_move_end_fidget = new mmove_t(FRAME_stand28,            FRAME_stand35, parasite_frames_end_fidget, parasite_stand);    static mframe_t parasite_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, parasite_tap),            new mframe_t(GameAI.ai_stand, 0, null),            new mframe_t(GameAI.ai_stand, 0, parasite_tap),            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, parasite_tap),            new mframe_t(GameAI.ai_stand, 0, null),            new mframe_t(GameAI.ai_stand, 0, parasite_tap),            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, parasite_tap),            new mframe_t(GameAI.ai_stand, 0, null),            new mframe_t(GameAI.ai_stand, 0, parasite_tap) };    static mmove_t parasite_move_stand = new mmove_t(FRAME_stand01,            FRAME_stand17, parasite_frames_stand, parasite_stand);    static mframe_t parasite_frames_run[] = new mframe_t[] {            new mframe_t(GameAI.ai_run, 30, null),            new mframe_t(GameAI.ai_run, 30, null),            new mframe_t(GameAI.ai_run, 22, null),            new mframe_t(GameAI.ai_run, 19, null),            new mframe_t(GameAI.ai_run, 24, null),            new mframe_t(GameAI.ai_run, 28, null),            new mframe_t(GameAI.ai_run, 25, null) };    static mmove_t parasite_move_run = new mmove_t(FRAME_run03, FRAME_run09,            parasite_frames_run, null);    static mframe_t parasite_frames_start_run[] = new mframe_t[] {            new mframe_t(GameAI.ai_run, 0, null),            new mframe_t(GameAI.ai_run, 30, null), };    static mmove_t parasite_move_start_run = new mmove_t(FRAME_run01,            FRAME_run02, parasite_frames_start_run, parasite_run);    static mframe_t parasite_frames_stop_run[] = new mframe_t[] {            new mframe_t(GameAI.ai_run, 20, null),            new mframe_t(GameAI.ai_run, 20, null),            new mframe_t(GameAI.ai_run, 12, null),            new mframe_t(GameAI.ai_run, 10, null),            new mframe_t(GameAI.ai_run, 0, null),            new mframe_t(GameAI.ai_run, 0, null) };    static mmove_t parasite_move_stop_run = new mmove_t(FRAME_run10,            FRAME_run15, parasite_frames_stop_run, null);    static mframe_t parasite_frames_walk[] = new mframe_t[] {            new mframe_t(GameAI.ai_walk, 30, null),            new mframe_t(GameAI.ai_walk, 30, null),            new mframe_t(GameAI.ai_walk, 22, null),            new mframe_t(GameAI.ai_walk, 19, null),            new mframe_t(GameAI.ai_walk, 24, null),            new mframe_t(GameAI.ai_walk, 28, null),            new mframe_t(GameAI.ai_walk, 25, null) };    static mmove_t parasite_move_walk = new mmove_t(FRAME_run03, FRAME_run09,            parasite_frames_walk, parasite_walk);    static mframe_t parasite_frames_start_walk[] = new mframe_t[] {            new mframe_t(GameAI.ai_walk, 0, null),            new mframe_t(GameAI.ai_walk, 30, parasite_walk) };    static mmove_t parasite_move_start_walk = new mmove_t(FRAME_run01,            FRAME_run02, parasite_frames_start_walk, null);    static mframe_t parasite_frames_stop_walk[] = new mframe_t[] {            new mframe_t(GameAI.ai_walk, 20, null),            new mframe_t(GameAI.ai_walk, 20, null),            new mframe_t(GameAI.ai_walk, 12, null),            new mframe_t(GameAI.ai_walk, 10, null),            new mframe_t(GameAI.ai_walk, 0, null),            new mframe_t(GameAI.ai_walk, 0, null) };    static mmove_t parasite_move_stop_walk = new mmove_t(FRAME_run10,            FRAME_run15, parasite_frames_stop_walk, null);    static mframe_t parasite_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),            new mframe_t(GameAI.ai_move, 0, null),            new mframe_t(GameAI.ai_move, 6, null),            new mframe_t(GameAI.ai_move, 16, null),            new mframe_t(GameAI.ai_move, -6, null),            new mframe_t(GameAI.ai_move, -7, null),            new mframe_t(GameAI.ai_move, 0, null) };    static mmove_t parasite_move_pain1 = new mmove_t(FRAME_pain101,            FRAME_pain111, parasite_frames_pain1, parasite_start_run);    static EntPainAdapter parasite_pain = new EntPainAdapter() {    	public String getID(){ return "parasite_pain"; }        public void pain(edict_t self, edict_t other, float kick, int damage) {            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;            if (GameBase.skill.value == 3)

⌨️ 快捷键说明

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