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
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
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