C# 클래스 Nez.CircleCollider

상속: Collider
파일 보기 프로젝트 열기: prime31/Nez

공개 메소드들

메소드 설명
CircleCollider ( ) : Microsoft.Xna.Framework

zero param constructor requires that a RenderableComponent be on the entity so that the collider can size itself when the entity is added to the scene.

CircleCollider ( float radius ) : Microsoft.Xna.Framework

creates a CircleCollider with radius. Note that when specifying a radius if using a RenderableComponent on the Entity as well you will need to set the origin to align the CircleCollider. For example, if the RenderableComponent has a 0,0 origin and a CircleCollider with a radius of 1.5f * renderable.width is created you can offset the origin by just setting the originNormalied to the center divided by the scaled size: entity.collider = new CircleCollider( moonTexture.Width * 1.5f ); entity.collider.originNormalized = Vector2Extension.halfVector() / 1.5f;

ToString ( ) : string
debugRender ( Graphics graphics ) : void
setRadius ( float radius ) : CircleCollider

메소드 상세

CircleCollider() 공개 메소드

zero param constructor requires that a RenderableComponent be on the entity so that the collider can size itself when the entity is added to the scene.
public CircleCollider ( ) : Microsoft.Xna.Framework
리턴 Microsoft.Xna.Framework

CircleCollider() 공개 메소드

creates a CircleCollider with radius. Note that when specifying a radius if using a RenderableComponent on the Entity as well you will need to set the origin to align the CircleCollider. For example, if the RenderableComponent has a 0,0 origin and a CircleCollider with a radius of 1.5f * renderable.width is created you can offset the origin by just setting the originNormalied to the center divided by the scaled size: entity.collider = new CircleCollider( moonTexture.Width * 1.5f ); entity.collider.originNormalized = Vector2Extension.halfVector() / 1.5f;
public CircleCollider ( float radius ) : Microsoft.Xna.Framework
radius float Radius.
리턴 Microsoft.Xna.Framework

ToString() 공개 메소드

public ToString ( ) : string
리턴 string

debugRender() 공개 메소드

public debugRender ( Graphics graphics ) : void
graphics Graphics
리턴 void

setRadius() 공개 메소드

public setRadius ( float radius ) : CircleCollider
radius float
리턴 CircleCollider