Class GameObject

java.lang.Object
miniGame.game_2048.GameObject

public class GameObject
extends java.lang.Object
Author:
김건호 게임 블럭들의 스피드, 블럭의 값, 색, 블럭의 랜덤으로 나오는 값을 생성해준 곳입니다.
  • Field Summary

    Fields
    Modifier and Type Field Description
    boolean hasMoved  
    int height  
    boolean moving  
    (package private) java.util.Random rand  
    boolean remove  
    int speed  
    Sprite sprite  
    int value  
    int width  
    double x  
    double y  
  • Constructor Summary

    Constructors
    Constructor Description
    GameObject​(double x, double y)  
  • Method Summary

    Modifier and Type Method Description
    boolean canMove()
    블럭값들이 어느정도 움직일수있는지를 설정해준 값입니다.
    void createSprite()  
    void render()  
    void update()
    블럭의 위치가 옆에 얼마나 떨어져있는지에 대해서 키보드를 입력했을때 똑같은 속도로 움직이게 하기 위해 지정해준 값들

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • x

      public double x
    • y

      public double y
    • width

      public int width
    • height

      public int height
    • sprite

      public Sprite sprite
    • value

      public int value
    • speed

      public int speed
    • moving

      public boolean moving
    • remove

      public boolean remove
    • hasMoved

      public boolean hasMoved
    • rand

      java.util.Random rand
  • Constructor Details

    • GameObject

      public GameObject​(double x, double y)
  • Method Details

    • createSprite

      public void createSprite()
    • canMove

      public boolean canMove()
      블럭값들이 어느정도 움직일수있는지를 설정해준 값입니다.
      Returns:
      false
    • update

      public void update()
      블럭의 위치가 옆에 얼마나 떨어져있는지에 대해서 키보드를 입력했을때 똑같은 속도로 움직이게 하기 위해 지정해준 값들
    • render

      public void render()