C# Класс Nez.CircleCollider

Наследование: Collider
Показать файл Открыть проект

Открытые методы

Метод Описание
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