C# Класс PathfindingTest.Players.Player

Наследование: MouseClickListener, MouseMotionListener
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
alliance Alliance
arrowManager ArrowManager
color Color
device GraphicsDevice
fastStore UnitStore
lightTexture Microsoft.Xna.Framework.Graphics.Texture2D
meleeStore UnitStore
rangedStore UnitStore

Private Properties

Свойство Тип Описание
Draw void

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

Метод Описание
DeselectAllBuildings ( ) : void

Deselects all buildings.

DeselectAllUnits ( ) : void

Deselects all units.

DrawHud ( SpriteBatch sb ) : void
DrawLights ( GameTime gameTime, SpriteBatch spriteBatch, Microsoft.Xna.Framework.Graphics.Texture2D lightTexture ) : void
DrawLights ( SpriteBatch spriteBatch ) : void
DrawMiniLights ( SpriteBatch spriteBatch, MiniMap map ) : void
GetAddedOffsettedMouseLocation ( MouseEvent m ) : Point

Gets the mouse location with the offset added.

GetBuildings ( ) : BuildingSelection
GetMouseOverBuilding ( CustomArrayList buildings ) : PathfindingTest.Buildings.Building

Whether the mouse is over a unit or not if it is, it'll return it. =D

GetMouseOverUnit ( ) : Unit

Gets the unit that the mouse is over, of all players.

GetMouseOverUnit ( CustomArrayList units ) : Unit

Whether the mouse is over a unit or not if it is, it'll return it. =D

GetNewPreviewPattern ( Point patternCenterLocation, Point offsettedMouseLocation, int angle ) : UnitGroupPattern

Gets the new current preview pattern (TEMPORARY FUNCTION)

GetSelectedBuildings ( ) : BuildingSelection
GetSelectedUnits ( ) : UnitSelection
GetSubstractedOffsettedMouseLocation ( MouseEvent m ) : Point

Gets the mouse location with the offset substracted.

GetUnits ( ) : UnitSelection
IsMouseOverFriendlyBuilding ( ) : PathfindingTest.Buildings.Building
IsPreviewingBuilding ( ) : System.Boolean

Whether the player is currently previewing a building

OnMouseClick ( MouseEvent m ) : void
OnMouseDrag ( MouseEvent m ) : void
OnMouseMotion ( MouseEvent m ) : void
OnMouseRelease ( MouseEvent m ) : void
Player ( Alliance alliance, Color color, Point startLocation ) : System

Player constructor.

RemovePreviewBuildings ( ) : void

Removes all the preview buildings

SpawnStartUnits ( ) : void

Spawns the starting units of this player.

Update ( KeyboardState ks, Microsoft.Xna.Framework.Input.MouseState ms ) : void

Standard Update function.

stopUnitSelection ( ) : void

Приватные методы

Метод Описание
Draw ( SpriteBatch sb ) : void

Standard Draw function.

Описание методов

DeselectAllBuildings() публичный Метод

Deselects all buildings.
public DeselectAllBuildings ( ) : void
Результат void

DeselectAllUnits() публичный Метод

Deselects all units.
public DeselectAllUnits ( ) : void
Результат void

DrawHud() публичный Метод

public DrawHud ( SpriteBatch sb ) : void
sb Microsoft.Xna.Framework.Graphics.SpriteBatch
Результат void

DrawLights() публичный Метод

public DrawLights ( GameTime gameTime, SpriteBatch spriteBatch, Microsoft.Xna.Framework.Graphics.Texture2D lightTexture ) : void
gameTime Microsoft.Xna.Framework.GameTime
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch
lightTexture Microsoft.Xna.Framework.Graphics.Texture2D
Результат void

DrawLights() публичный Метод

public DrawLights ( SpriteBatch spriteBatch ) : void
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch
Результат void

DrawMiniLights() публичный Метод

public DrawMiniLights ( SpriteBatch spriteBatch, MiniMap map ) : void
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch
map MiniMap
Результат void

GetAddedOffsettedMouseLocation() публичный Метод

Gets the mouse location with the offset added.
public GetAddedOffsettedMouseLocation ( MouseEvent m ) : Point
m MouseEvent The mouse event.
Результат Point

GetBuildings() публичный Метод

public GetBuildings ( ) : BuildingSelection
Результат PathfindingTest.Selection.BuildingSelection

GetMouseOverBuilding() публичный Метод

Whether the mouse is over a unit or not if it is, it'll return it. =D
public GetMouseOverBuilding ( CustomArrayList buildings ) : PathfindingTest.Buildings.Building
buildings CustomArrayList
Результат PathfindingTest.Buildings.Building

GetMouseOverUnit() публичный Метод

Gets the unit that the mouse is over, of all players.
public GetMouseOverUnit ( ) : Unit
Результат PathfindingTest.Units.Unit

GetMouseOverUnit() публичный Метод

Whether the mouse is over a unit or not if it is, it'll return it. =D
public GetMouseOverUnit ( CustomArrayList units ) : Unit
units CustomArrayList
Результат PathfindingTest.Units.Unit

GetNewPreviewPattern() публичный Метод

Gets the new current preview pattern (TEMPORARY FUNCTION)
public GetNewPreviewPattern ( Point patternCenterLocation, Point offsettedMouseLocation, int angle ) : UnitGroupPattern
patternCenterLocation Point
offsettedMouseLocation Point The location at which the mouse is at, with offset substracted
angle int The angle
Результат PathfindingTest.Selection.Patterns.UnitGroupPattern

GetSelectedBuildings() публичный Метод

public GetSelectedBuildings ( ) : BuildingSelection
Результат PathfindingTest.Selection.BuildingSelection

GetSelectedUnits() публичный Метод

public GetSelectedUnits ( ) : UnitSelection
Результат PathfindingTest.Selection.UnitSelection

GetSubstractedOffsettedMouseLocation() публичный Метод

Gets the mouse location with the offset substracted.
public GetSubstractedOffsettedMouseLocation ( MouseEvent m ) : Point
m MouseEvent The mouse event.
Результат Point

GetUnits() публичный Метод

public GetUnits ( ) : UnitSelection
Результат PathfindingTest.Selection.UnitSelection

IsMouseOverFriendlyBuilding() публичный Метод

public IsMouseOverFriendlyBuilding ( ) : PathfindingTest.Buildings.Building
Результат PathfindingTest.Buildings.Building

IsPreviewingBuilding() публичный Метод

Whether the player is currently previewing a building
public IsPreviewingBuilding ( ) : System.Boolean
Результат System.Boolean

OnMouseClick() публичный Метод

public OnMouseClick ( MouseEvent m ) : void
m MouseEvent
Результат void

OnMouseDrag() публичный Метод

public OnMouseDrag ( MouseEvent m ) : void
m MouseEvent
Результат void

OnMouseMotion() публичный Метод

public OnMouseMotion ( MouseEvent m ) : void
m MouseEvent
Результат void

OnMouseRelease() публичный Метод

public OnMouseRelease ( MouseEvent m ) : void
m MouseEvent
Результат void

Player() публичный Метод

Player constructor.
public Player ( Alliance alliance, Color color, Point startLocation ) : System
alliance Alliance
color Color
startLocation Point
Результат System

RemovePreviewBuildings() публичный Метод

Removes all the preview buildings
public RemovePreviewBuildings ( ) : void
Результат void

SpawnStartUnits() публичный Метод

Spawns the starting units of this player.
public SpawnStartUnits ( ) : void
Результат void

Update() публичный Метод

Standard Update function.
public Update ( KeyboardState ks, Microsoft.Xna.Framework.Input.MouseState ms ) : void
ks Microsoft.Xna.Framework.Input.KeyboardState
ms Microsoft.Xna.Framework.Input.MouseState
Результат void

stopUnitSelection() публичный Метод

public stopUnitSelection ( ) : void
Результат void

Описание свойств

alliance публичное свойство

public Alliance alliance
Результат Alliance

arrowManager публичное свойство

public ArrowManager arrowManager
Результат ArrowManager

color публичное свойство

public Color color
Результат Color

device публичное свойство

public GraphicsDevice device
Результат GraphicsDevice

fastStore публичное свойство

public UnitStore fastStore
Результат UnitStore

lightTexture публичное свойство

public Texture2D,Microsoft.Xna.Framework.Graphics lightTexture
Результат Microsoft.Xna.Framework.Graphics.Texture2D

meleeStore публичное свойство

public UnitStore meleeStore
Результат UnitStore

rangedStore публичное свойство

public UnitStore rangedStore
Результат UnitStore