C# 클래스 Server.GameObject

Summary description for GameObject.
상속: Object
파일 보기 프로젝트 열기: pmyoung/Advanced-Game-Project 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
angle float
id int
mass int
radius int
speedX float
speedY float
spriteID int
x float
y float

공개 메소드들

메소드 설명
GameObject ( ) : System

GameObject() initializes a new ID for every GameObject object which is one more than the previous ID.

This sets the IDs so that they will always be unique.

calculateGravity ( ) : void

calculateGravity() modifies acceleration rates of game objects based on gravity effect

checkCollision ( GameObject object2 ) : bool

checkCollision() checks the collision between two GameObjects.

Collision detection is based upon the radius of the objects and the distance between them.

outOfBounds ( ) : void
updatePosition ( ) : void

updatePosition() updates the GameObjects position based off of its current speed.

At this time, function is not called. In the future, this method might handle all movement for the GameObjects

메소드 상세

GameObject() 공개 메소드

GameObject() initializes a new ID for every GameObject object which is one more than the previous ID.
This sets the IDs so that they will always be unique.
public GameObject ( ) : System
리턴 System

calculateGravity() 공개 메소드

calculateGravity() modifies acceleration rates of game objects based on gravity effect
public calculateGravity ( ) : void
리턴 void

checkCollision() 공개 메소드

checkCollision() checks the collision between two GameObjects.
Collision detection is based upon the radius of the objects and the distance between them.
public checkCollision ( GameObject object2 ) : bool
object2 GameObject An instance to a GameObject
리턴 bool

outOfBounds() 공개 메소드

public outOfBounds ( ) : void
리턴 void

updatePosition() 공개 메소드

updatePosition() updates the GameObjects position based off of its current speed.
At this time, function is not called. In the future, this method might handle all movement for the GameObjects
public updatePosition ( ) : void
리턴 void

프로퍼티 상세

angle 공개적으로 프로퍼티

public float angle
리턴 float

id 공개적으로 프로퍼티

public int id
리턴 int

mass 공개적으로 프로퍼티

public int mass
리턴 int

radius 공개적으로 프로퍼티

public int radius
리턴 int

speedX 공개적으로 프로퍼티

public float speedX
리턴 float

speedY 공개적으로 프로퍼티

public float speedY
리턴 float

spriteID 공개적으로 프로퍼티

public int spriteID
리턴 int

x 공개적으로 프로퍼티

public float x
리턴 float

y 공개적으로 프로퍼티

public float y
리턴 float