Android Open Source - TheFirstMyth02 Game Chapter Base Set_ Shentan






From Project

Back to project page TheFirstMyth02.

License

The source code is released under:

MIT License

If you think the Android project TheFirstMyth02 listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.game.base;
/*from w  w  w.j  a va2  s.  c o m*/
import java.util.ArrayList;
import java.util.List;

import android.content.Context;

import com.example.fengshen.R;
import com.game.commen.ActionToDo;
import com.game.commen.Direction;
import com.game.commen.EffectName;
import com.game.commen.GetImgCommen;
import com.game.commen.MapName;
import com.game.data.RoleData_Main;
import com.game.data.StroyTipData;
import com.game.effect.SpecialEffect;
import com.game.renwu.Spirit_NPC;
import com.game.stroy.MainStroy;
import com.game.tip.PublicTips;

public class GameChapterBaseSet_Shentan {
  
  public List<StroyTipData> stdlist;
  private Context mContext;
  public GameMap maps_shentan;
  public PublicTips tips;
  public boolean stroyflag = false; 
  public int stroytime = 0;
  public static int StoryFlaging = 0;
  //????
  public List<SpecialEffect> effectlist;
  public List<Spirit_NPC> NPCList;
  public GameChapterBaseSet_Shentan(Context Context) {
    // TODO Auto-generated constructor stub
    mContext=Context;
    
    stdlist = new ArrayList<StroyTipData>();
    stdlist = MainStroy.getmainstroy_chapter1();
    tips = new PublicTips("publicimg/tipbd.png",stdlist,0);
    
    // ??????1
    SpecialEffect shentan1 = new SpecialEffect(EffectName.??_????1,
            "effects/part1/shentan1/0049-ecd97d89-",773,395, 14, true);
    // ??????2
    SpecialEffect shentan2 = new SpecialEffect(EffectName.??_????2,
                "effects/part1/shentan2/0053-1be628f9-",773,395, 19, false);
    effectlist = new ArrayList<SpecialEffect>();
    effectlist.add(shentan1);
    effectlist.add(shentan2);
    
    RoleData_Main roloinfo_chijiaodaxian = new RoleData_Main();
    roloinfo_chijiaodaxian
        .setPlayerImgUrl_zhan("spirit/npc/chijiaodaxian/0329-2073f650-");
    roloinfo_chijiaodaxian
        .setPlayerImgUrl_selectflag("spirit/npcpublic/0003-16c93edf-");
    roloinfo_chijiaodaxian.setPao_max(0);
    roloinfo_chijiaodaxian.setZhan_max(9);
    roloinfo_chijiaodaxian.setMapset_X(600);
    roloinfo_chijiaodaxian.setMapset_Y(370);
    roloinfo_chijiaodaxian.setDefault_dir(Direction.????);
    roloinfo_chijiaodaxian.setDefault_act(ActionToDo.??);
    roloinfo_chijiaodaxian.setPlayerName("????");
    roloinfo_chijiaodaxian.setTalkAbout("??????????????...");
    Spirit_NPC npc_chijiaodaxian = new Spirit_NPC(roloinfo_chijiaodaxian);
    
    RoleData_Main roloinfo_qingxuzhenren = new RoleData_Main();
    roloinfo_qingxuzhenren
        .setPlayerImgUrl_zhan("spirit/npc/qingxuzhenjun/0352-22406e66-");
    roloinfo_qingxuzhenren
        .setPlayerImgUrl_selectflag("spirit/npcpublic/0003-16c93edf-");
    roloinfo_qingxuzhenren.setPao_max(0);
    roloinfo_qingxuzhenren.setZhan_max(13);
    roloinfo_qingxuzhenren.setMapset_X(950);
    roloinfo_qingxuzhenren.setMapset_Y(350);
    roloinfo_qingxuzhenren.setDefault_dir(Direction.??);
    roloinfo_qingxuzhenren.setDefault_act(ActionToDo.??);
    roloinfo_qingxuzhenren.setPlayerName("??????");
    roloinfo_qingxuzhenren.setTalkAbout("???????????,?????????????????");
    Spirit_NPC npc_qingxuzhenren = new Spirit_NPC(roloinfo_qingxuzhenren);
    
    RoleData_Main roloinfo_taishanglaojun = new RoleData_Main();
    roloinfo_taishanglaojun
        .setPlayerImgUrl_zhan("spirit/npc/taishanglaojun/0533-3599d5c3-");
    roloinfo_taishanglaojun
        .setPlayerImgUrl_selectflag("spirit/npcpublic/0003-16c93edf-");
    roloinfo_taishanglaojun.setPao_max(0);
    roloinfo_taishanglaojun.setZhan_max(9);
    roloinfo_taishanglaojun.setMapset_X(490);
    roloinfo_taishanglaojun.setMapset_Y(400);
    roloinfo_taishanglaojun.setDefault_dir(Direction.????);
    roloinfo_taishanglaojun.setDefault_act(ActionToDo.??);
    roloinfo_taishanglaojun.setPlayerName("???????");
    roloinfo_taishanglaojun.setTalkAbout("??????????????????????????");
    Spirit_NPC npc_taishanglaojun = new Spirit_NPC(roloinfo_taishanglaojun);
    
    RoleData_Main roloinfo_taiyizhenren = new RoleData_Main();
    roloinfo_taiyizhenren
        .setPlayerImgUrl_zhan("spirit/npc/xianren/1952-ca3334ff-");
    roloinfo_taiyizhenren
        .setPlayerImgUrl_selectflag("spirit/npcpublic/0003-16c93edf-");
    roloinfo_taiyizhenren.setPao_max(0);
    roloinfo_taiyizhenren.setZhan_max(10);
    roloinfo_taiyizhenren.setMapset_X(1100);
    roloinfo_taiyizhenren.setMapset_Y(420);
    roloinfo_taiyizhenren.setDefault_dir(Direction.??);
    roloinfo_taiyizhenren.setDefault_act(ActionToDo.??);
    roloinfo_taiyizhenren.setPlayerName("????");
    roloinfo_taiyizhenren.setTalkAbout("???????????????????????");
    Spirit_NPC npc_taiyizhenren = new Spirit_NPC(roloinfo_taiyizhenren);
    
    
    NPCList = new ArrayList<Spirit_NPC>();
    NPCList.add(npc_chijiaodaxian);
    NPCList.add(npc_qingxuzhenren);
    NPCList.add(npc_taishanglaojun);
    NPCList.add(npc_taiyizhenren);
    
    maps_shentan = new GameMap(mContext,GetImgCommen.readBitMap(mContext,
        R.drawable.map_shengjie),GetImgCommen.readBitMap(mContext,
            R.drawable.map_shengjie0),null, 10, 10, NPCList, null,effectlist,
            tips,MapName.??_????);
    
    Thread td = new Thread(rbtime_story);
    td.start();
    stroyflag =true;
//    StroyPlayIng(StoryFlag,MainStroy.getmainstroy_chapter1());
    
  }

  //???????????
  public void addSpecialEffect(SpecialEffect addEffect)
  {
    effectlist.add(addEffect);
  }
  
  //?????????
  public void removeSpecialEffect(SpecialEffect addEffect)
  {
    effectlist.remove(addEffect);
  }
  
  
  Runnable rbtime_story =new Runnable() {
    
    @Override
    public void run() {
      // TODO Auto-generated method stub
      while (stroyflag) {
        try {
          Thread.sleep(PubSet.miao);
          
          if(stroytime==10)
          {
            tips.StroyPlayIng(0,stdlist);
            tips.showflag=true;
          }
          
          stroytime++;
        } catch (InterruptedException e) {
          e.printStackTrace();
        }
      }
    }
  };
  
  @Override
  protected Object clone() throws CloneNotSupportedException {
    // TODO Auto-generated method stub
    return super.clone();
  }
}




Java Source Code List

.Test.java
com.game.base.BaseInfo.java
com.game.base.GameBackGround.java
com.game.base.GameChapterBaseSet_Shentan.java
com.game.base.GameMap.java
com.game.base.PubSet.java
com.game.commen.AStarMap.java
com.game.commen.AStarNode.java
com.game.commen.AStar.java
com.game.commen.ActionToDo.java
com.game.commen.BitmapTouchChecker.java
com.game.commen.BitmapUtil.java
com.game.commen.Direction.java
com.game.commen.EffectName.java
com.game.commen.GameXmlcommen.java
com.game.commen.GetImgCommen.java
com.game.commen.IrregularButton.java
com.game.commen.MapName.java
com.game.commen.Paintforziti.java
com.game.commen.ToDo.java
com.game.data.BaseInfo.java
com.game.data.RoleData_Main.java
com.game.data.RoleData.java
com.game.data.StroyTipData.java
com.game.effect.SpecialEffect.java
com.game.fengshen.GameActivity.java
com.game.fengshen.GameMainActivity.java
com.game.fengshen.GameView.java
com.game.fengshen.MoveTest.java
com.game.renwu.Objs.java
com.game.renwu.SpiritMain.java
com.game.renwu.Spirit_Main.java
com.game.renwu.Spirit_NPC.java
com.game.renwu.Spirit.java
com.game.renwu.Spiritgirl.java
com.game.stroy.MainStroy.java
com.game.tip.PublicTips.java