📄 gamedesign.java
字号:
/* * Copyright (c) 2007, Sun Microsystems, Inc. * * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * Neither the name of Sun Microsystems, Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */package demo;import javax.microedition.midlet.*;import javax.microedition.lcdui.*;import javax.microedition.lcdui.game.*;/** * @author Karel Herink * @version 1.0 */public class GameDesign { //<editor-fold defaultstate="collapsed" desc=" Generated Fields ">//GEN-BEGIN:|fields|0| private TiledLayer StartText; private Image topview_tiles; public int AnimWaterSeq001Delay = 200; public int[] AnimWaterSeq001 = {71, 72, 73, 74, 75}; private TiledLayer Trees; private Image Text2; private TiledLayer WynikiText; private Image Text3; private TiledLayer KoniecText; private Image Text4; private Image Text; private TiledLayer TitleText; private Image platform_tiles; private Sprite TitleMario; public int TitleMarioDownDelay = 200; public int[] TitleMarioDown = {2}; public int TitleMarioMiddleDelay = 200; public int[] TitleMarioMiddle = {1}; public int TitleMarioUpDelay = 200; public int[] TitleMarioUp = {0}; private Image Title_Mario; private Image TitleBackground; private Image Background001; private Image Tlo; private Image Mario_Move; private Sprite Block; public int BlockSeqDisapearDelay = 200; public int[] BlockSeqDisapear = {0, 1, 2, 3}; private Image Blocks; private Sprite Mario; public int MarioSeqWalkDownDelay = 150; public int[] MarioSeqWalkDown = {5, 6, 7, 8, 9, 7}; public int MarioSeqWalkSideDelay = 150; public int[] MarioSeqWalkSide = {10, 11, 12, 13, 14, 12}; public int MarioSeqWalkUpDelay = 150; public int[] MarioSeqWalkUp = {0, 1, 2, 3, 4, 2}; private Sprite Goomba; public int GoombaSeqWalkLeftDelay = 200; public int[] GoombaSeqWalkLeft = {0, 1, 2, 3, 4, 5}; public int GoombaSeqWalkUpDelay = 150; public int[] GoombaSeqWalkUp = {12, 13, 14, 15, 16, 14}; public int GoombaSeqWalkSideDelay = 150; public int[] GoombaSeqWalkSide = {6, 7, 8, 9, 10, 11}; public int GoombaSeqWalkDownDelay = 150; public int[] GoombaSeqWalkDown = {18, 19, 20, 21, 22, 20}; private Image Goomba_Move; private Sprite Coin; public int CoinSeqRolingDelay = 170; public int[] CoinSeqRoling = {0, 1, 2, 3, 4, 5, 6, 7}; private Image moneta; private Image Border; private TiledLayer TitleBorder; private Image Background_1; private Sprite Bomb; public int BombSeqTickingDelay = 300; public int[] BombSeqTicking = {0, 1, 0, 1, 0, 1}; public int BombSeqBoomDelay = 150; public int[] BombSeqBoom = {2, 2, 3, 3, 4, 4, 5, 5}; private Image Bomba; private Image Title_Background; private TiledLayer Titleground; private TiledLayer Rocks; private TiledLayer Background; //</editor-fold>//GEN-END:|fields|0| //<editor-fold defaultstate="collapsed" desc=" Generated Methods ">//GEN-BEGIN:|methods|0| //</editor-fold>//GEN-END:|methods|0| public Image getTopview_tiles() throws java.io.IOException {//GEN-BEGIN:|2-getter|0|2-preInit if (topview_tiles == null) {//GEN-END:|2-getter|0|2-preInit // write pre-init user code here topview_tiles = Image.createImage("/Background_1.png");//GEN-BEGIN:|2-getter|1|2-postInit }//GEN-END:|2-getter|1|2-postInit // write post-init user code here return this.topview_tiles;//GEN-BEGIN:|2-getter|2| }//GEN-END:|2-getter|2| public Image getPlatform_tiles() throws java.io.IOException {//GEN-BEGIN:|161-getter|0|161-preInit if (platform_tiles == null) {//GEN-END:|161-getter|0|161-preInit // write pre-init user code here platform_tiles = Image.createImage("/Title_Background.png");//GEN-BEGIN:|161-getter|1|161-postInit }//GEN-END:|161-getter|1|161-postInit // write post-init user code here return this.platform_tiles;//GEN-BEGIN:|161-getter|2| }//GEN-END:|161-getter|2| public Image getMario_Move() throws java.io.IOException {//GEN-BEGIN:|619-getter|0|619-preInit if (Mario_Move == null) {//GEN-END:|619-getter|0|619-preInit // write pre-init user code here Mario_Move = Image.createImage("/Mario_Move.png");//GEN-BEGIN:|619-getter|1|619-postInit }//GEN-END:|619-getter|1|619-postInit // write post-init user code here return this.Mario_Move;//GEN-BEGIN:|619-getter|2| }//GEN-END:|619-getter|2| public Sprite getMario() throws java.io.IOException {//GEN-BEGIN:|620-getter|0|620-preInit if (Mario == null) {//GEN-END:|620-getter|0|620-preInit // write pre-init user code here Mario = new Sprite(getMario_Move(), 16, 32);//GEN-BEGIN:|620-getter|1|620-postInit Mario.setFrameSequence(MarioSeqWalkSide);//GEN-END:|620-getter|1|620-postInit // write post-init user code here }//GEN-BEGIN:|620-getter|2| return Mario; }//GEN-END:|620-getter|2| public Image getGoomba_Move() throws java.io.IOException {//GEN-BEGIN:|624-getter|0|624-preInit if (Goomba_Move == null) {//GEN-END:|624-getter|0|624-preInit // write pre-init user code here Goomba_Move = Image.createImage("/Goomba_Move.png");//GEN-BEGIN:|624-getter|1|624-postInit }//GEN-END:|624-getter|1|624-postInit // write post-init user code here return this.Goomba_Move;//GEN-BEGIN:|624-getter|2| }//GEN-END:|624-getter|2| public Sprite getGoomba() throws java.io.IOException {//GEN-BEGIN:|625-getter|0|625-preInit if (Goomba == null) {//GEN-END:|625-getter|0|625-preInit // write pre-init user code here Goomba = new Sprite(getGoomba_Move(), 32, 32);//GEN-BEGIN:|625-getter|1|625-postInit Goomba.setFrameSequence(GoombaSeqWalkSide);//GEN-END:|625-getter|1|625-postInit // write post-init user code here }//GEN-BEGIN:|625-getter|2| return Goomba; }//GEN-END:|625-getter|2| public Image getMoneta() throws java.io.IOException {//GEN-BEGIN:|629-getter|0|629-preInit if (moneta == null) {//GEN-END:|629-getter|0|629-preInit // write pre-init user code here moneta = Image.createImage("/moneta.png");//GEN-BEGIN:|629-getter|1|629-postInit }//GEN-END:|629-getter|1|629-postInit // write post-init user code here return this.moneta;//GEN-BEGIN:|629-getter|2| }//GEN-END:|629-getter|2| public Sprite getCoin() throws java.io.IOException {//GEN-BEGIN:|630-getter|0|630-preInit if (Coin == null) {//GEN-END:|630-getter|0|630-preInit // write pre-init user code here Coin = new Sprite(getMoneta(), 16, 16);//GEN-BEGIN:|630-getter|1|630-postInit Coin.setFrameSequence(CoinSeqRoling);//GEN-END:|630-getter|1|630-postInit // write post-init user code here }//GEN-BEGIN:|630-getter|2| return Coin; }//GEN-END:|630-getter|2| public Image getBomba() throws java.io.IOException {//GEN-BEGIN:|632-getter|0|632-preInit if (Bomba == null) {//GEN-END:|632-getter|0|632-preInit // write pre-init user code here Bomba = Image.createImage("/Bomba.png");//GEN-BEGIN:|632-getter|1|632-postInit }//GEN-END:|632-getter|1|632-postInit // write post-init user code here return this.Bomba;//GEN-BEGIN:|632-getter|2| }//GEN-END:|632-getter|2| public Sprite getBomb() throws java.io.IOException {//GEN-BEGIN:|633-getter|0|633-preInit if (Bomb == null) {//GEN-END:|633-getter|0|633-preInit // write pre-init user code here Bomb = new Sprite(getBomba(), 16, 16);//GEN-BEGIN:|633-getter|1|633-postInit Bomb.setFrameSequence(BombSeqTicking);//GEN-END:|633-getter|1|633-postInit // write post-init user code here }//GEN-BEGIN:|633-getter|2| return Bomb; }//GEN-END:|633-getter|2| public Image getBackground_1() throws java.io.IOException {//GEN-BEGIN:|635-getter|0|635-preInit if (Background_1 == null) {//GEN-END:|635-getter|0|635-preInit // write pre-init user code here
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -