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

📄 dicesnewturnanim.java

📁 手机播放交谈实时监控软件
💻 JAVA
字号:
// Copyright (c) 2005 Sony Ericsson Mobile Communications AB
//
// This software is provided "AS IS," without a warranty of any kind. 
// ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, 
// INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A 
// PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. 
//
// THIS SOFTWARE IS COMPLEMENTARY OF JAYWAY AB (www.jayway.se)

package bluegammon.gui.animation;

import bluegammon.gui.BoardCanvas;

/**
 * Animation of a player throwing his or her two dices at
 * the start of a new turn.
 * 
 * @author Peter Andersson
 */
public class DicesNewTurnAnim extends AbstractDicesAnim
{

  /**
   * Creates a new animation on a new turn, throws two dices
   * of the same color.
   * @param dicesWhite	True if dices should be white, false otherwise.
   * @param dice1		Value of first dice (1-6).
   * @param dice2		Value of second dice (1-6).
   */
  public DicesNewTurnAnim(boolean dicesWhite, int dice1, int dice2)
  {
    super(dicesWhite, dicesWhite, dice1, dice2);
  }

  /**
   * Prevents interacton and disables drawing of dicevalues.
   */
  public void onStart()
  {
    super.onStart();
    BoardCanvas.getInstance().allowInteraction(false);
    BoardCanvas.getInstance().setDrawDiceValues(false);
  }

  /**
   * Updates cursor, enables interaction and start
   * drawing the dicevalues.
   */
  public void onExit()
  {
    super.onExit();
    BoardCanvas.getInstance().cursorNearestIndex(0,0);
    BoardCanvas.getInstance().allowInteraction(true);
    BoardCanvas.getInstance().setDrawDiceValues(true);
    BoardCanvas.getInstance().updateCursor();
  }
}

⌨️ 快捷键说明

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