C# 클래스 Nez.SpringGrid

grid of springs based on the tutorial: http://gamedevelopment.tutsplus.com/tutorials/make-a-neon-vector-shooter-for-ios-the-warping-grid--gamedev-14637
상속: RenderableComponent, IUpdatable
파일 보기 프로젝트 열기: prime31/Nez

공개 프로퍼티들

프로퍼티 타입 설명
gridMajorColor Color
gridMajorPeriodX int
gridMajorPeriodY int
gridMajorThickness float
gridMinorColor Color
gridMinorThickness float

공개 메소드들

메소드 설명
SpringGrid ( Rectangle gridSize, Vector2 spacing ) : System.Collections.Generic
applyDirectedForce ( Vector2 force, Vector2 position, float radius ) : void

applies a force in a 3-dimensional direction

applyDirectedForce ( Vector3 force, Vector3 position, float radius ) : void

applies a force in a 3-dimensional direction

applyExplosiveForce ( float force, Vector2 position, float radius ) : void

applies a force the pushes the grid out aware from the point

applyExplosiveForce ( float force, Vector3 position, float radius ) : void

applies a force the pushes the grid out aware from the point

applyImplosiveForce ( float force, Vector2 position, float radius ) : void

applies a force that sucks the grid in towards the point

applyImplosiveForce ( float force, Vector3 position, float radius ) : void

applies a force that sucks the grid in towards the point

render ( Graphics graphics, Camera camera ) : void

비공개 메소드들

메소드 설명
IUpdatable ( ) : void
drawLine ( Batcher batcher, Vector2 start, Vector2 end, Color color, float thickness = 2f ) : void
projectToVector2 ( Vector3 v ) : Vector2

메소드 상세

SpringGrid() 공개 메소드

public SpringGrid ( Rectangle gridSize, Vector2 spacing ) : System.Collections.Generic
gridSize Microsoft.Xna.Framework.Rectangle
spacing Vector2
리턴 System.Collections.Generic

applyDirectedForce() 공개 메소드

applies a force in a 3-dimensional direction
public applyDirectedForce ( Vector2 force, Vector2 position, float radius ) : void
force Vector2 Force.
position Vector2 Position.
radius float Radius.
리턴 void

applyDirectedForce() 공개 메소드

applies a force in a 3-dimensional direction
public applyDirectedForce ( Vector3 force, Vector3 position, float radius ) : void
force Vector3 Force.
position Vector3 Position.
radius float Radius.
리턴 void

applyExplosiveForce() 공개 메소드

applies a force the pushes the grid out aware from the point
public applyExplosiveForce ( float force, Vector2 position, float radius ) : void
force float Force.
position Vector2 Position.
radius float Radius.
리턴 void

applyExplosiveForce() 공개 메소드

applies a force the pushes the grid out aware from the point
public applyExplosiveForce ( float force, Vector3 position, float radius ) : void
force float Force.
position Vector3 Position.
radius float Radius.
리턴 void

applyImplosiveForce() 공개 메소드

applies a force that sucks the grid in towards the point
public applyImplosiveForce ( float force, Vector2 position, float radius ) : void
force float Force.
position Vector2 Position.
radius float Radius.
리턴 void

applyImplosiveForce() 공개 메소드

applies a force that sucks the grid in towards the point
public applyImplosiveForce ( float force, Vector3 position, float radius ) : void
force float Force.
position Vector3 Position.
radius float Radius.
리턴 void

render() 공개 메소드

public render ( Graphics graphics, Camera camera ) : void
graphics Graphics
camera Camera
리턴 void

프로퍼티 상세

gridMajorColor 공개적으로 프로퍼티

color of all major grid lines
public Color gridMajorColor
리턴 Color

gridMajorPeriodX 공개적으로 프로퍼티

how often a major grid line should appear on the x axis
public int gridMajorPeriodX
리턴 int

gridMajorPeriodY 공개적으로 프로퍼티

how often a major grid line should appear on the y axis
public int gridMajorPeriodY
리턴 int

gridMajorThickness 공개적으로 프로퍼티

thickness of all major grid lines
public float gridMajorThickness
리턴 float

gridMinorColor 공개적으로 프로퍼티

color of all minor grid lines
public Color gridMinorColor
리턴 Color

gridMinorThickness 공개적으로 프로퍼티

thickness of all minor grid lines
public float gridMinorThickness
리턴 float