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

📄 cplayer.java

📁 一个3D的保龄球的源代码
💻 JAVA
字号:
/**
 * <p>Title: class CPlayer</p>
 * <p>Description: The action control and state switch of player with controlled
 * by user. Also include of properties of player.</p>
 * <p>Copyright: Copyright (c) 2004</p>
 * <p>Company: Gameloft ShangHai</p>
 * @author Tao Qing, Wei XIA
 * @version 1.0
 */

class CPlayer {
  //the default max value for each property
  public static final int MAX_PLAYER_STRENGTH = 10;
  public static final int MAX_PLAYER_PRECISION = 10;
  public static final int MAX_PLAYER_ROTATION = 10;
  public static final int MAX_PLAYER_MENTATION = 10;
  public static final int MAX_PLAYER_LEVEL = 10;
  public static final int MAX_PLAYER_TIPSY_DEGREE = 10;
  public static final int MAX_PLAYER_STATE = 10;

  public int m_strength = 0;
  public int m_precision = 0;
  public int m_rotation = 0;
  public int m_mentation = 0;
  //Level attribute
  public int m_currentLevel = 0;
  public int m_tipsyDegree = 0;
  public int m_currentState = 0;
//new attributes for game
  //Game attribute
  String m_name;
  int m_playerType;
  int m_money;
  byte m_matchTimes; //The palyer has finished howmany matchs in currentLevel.
  //Match attribute
  ScoreInfo m_scoreInfo = new ScoreInfo();
  boolean m_isBounsTest;
  byte m_betType;
  boolean m_isMatchFinished;
  //Round attribute
  boolean m_isRoundFinished;
  //Bonus attribute
  byte m_bonusTimes;


//end

  /**
   * <p>Description:   </p>
   */
  public CPlayer() {

  }

  public CPlayer(int strength, int precision, int rotation, int mentation,
                 int currentLevel, int tipsyDegree, int currentState) {

    m_strength = strength;
    m_precision = precision;
    m_rotation = rotation;
    m_mentation = mentation;
    m_currentLevel = currentLevel;
    m_tipsyDegree = tipsyDegree;
    m_currentState = currentState;
  }




}

class ScoreInfo {
  /** Record the scores */
  byte scores[] = new byte[21];
  /** The total scores.*/
  int totalScores[] = new int[11];
  /** To record which one delivery score in the game. */
  int iScores;
  /** Need to add spare score flag. */
  boolean addSpareScore;
  /** Need to add strike score flag. */
  boolean addStrikeScore;
  /** Strike count. */
  int strikeCount;
  /** To record has trun how many pages . Less than 0 is trun back, large than 0 is trun forward.*/
  int trunPageNum;
  /** Construct the class  */

}

⌨️ 快捷键说明

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