C# 클래스 XnaFlixel.FlxG

This is a global helper class full of useful functions for audio, input, basic info, and the camera system among other things.
파일 보기 프로젝트 열기: jsbeckr/XnaFlixel

공개 프로퍼티들

프로퍼티 타입 설명
Game Microsoft.Xna.Framework.Game
GameTime Microsoft.Xna.Framework.GameTime
LIBRARY_MAJOR_VERSION uint
LIBRARY_MINOR_VERSION uint
LIBRARY_NAME string
autoHandlePause bool
backColor Microsoft.Xna.Framework.Color
debug bool
elapsed float
fade FlxFade
flash FlxFlash
followLead Microsoft.Xna.Framework.Vector2
followLerp float
followMax Microsoft.Xna.Framework.Point
followMin Microsoft.Xna.Framework.Point
followTarget FlxObject
gamepads XnaFlixel.data.FlxGamepad
getTimer uint
height int
keys FlxKeyboard
level int
levels List
maxElapsed float
mobile bool
mouse FlxMouse
music FlxSound
quake XnaFlixel.data.FlxQuake
save int
saves List
score int
scores List
scroll Microsoft.Xna.Framework.Vector2
showBounds bool
sounds List
timeScale float
width int

보호된 프로퍼티들

프로퍼티 타입 설명
_flxGame FlxGame
_mute bool
_pause bool
_scrollTarget Microsoft.Xna.Framework.Vector2
_volume float

공개 메소드들

메소드 설명
LoadContent ( GraphicsDevice gd ) : void
follow ( FlxObject Target, float Lerp ) : void
followAdjust ( float LeadX, float LeadY ) : void
followBounds ( int MinX, int MinY, int MaxX, int MaxY ) : void

Specify the boundaries of the level or where the camera is allowed to move. @param MinX The smallest X value of your level (usually 0). @param MinY The smallest Y value of your level (usually 0). @param MaxX The largest X value of your level (usually the level width). @param MaxY The largest Y value of your level (usually the level height). @param UpdateWorldBounds Whether the quad tree's dimensions should be updated to match.

followBounds ( int MinX, int MinY, int MaxX, int MaxY, bool UpdateWorldBounds ) : void
getMuteValue ( ) : int

Get a number that represents the mute state that we can multiply into a sound transform. @return An unsigned integer - 0 if muted, 1 if not muted.

log ( string Data ) : void

Log data to the developer console. @param Data Anything you want to log to the console.

play ( string EmbeddedSound ) : FlxSound

Creates a new sound object from an embedded Class object. @param EmbeddedSound The sound you want to play. @param Volume How loud to play it (0 to 1). @param Looped Whether or not to loop this sound. @return A FlxSound object.

play ( string EmbeddedSound, float Volume ) : FlxSound
play ( string EmbeddedSound, float Volume, bool Looped ) : FlxSound
playMusic ( string Music ) : void

Set up and play a looping background soundtrack. @param Music The sound file you want to loop in the background. @param Volume How loud the sound should be, from 0 to 1.

playMusic ( string Music, float Volume ) : void
resetInput ( ) : void

Reset the input helper objects (useful when changing screens or states)

보호된 메소드들

메소드 설명
changeSounds ( ) : void

An internal function that adjust the volume levels and the music channel after a change.

pauseSounds ( ) : void

Internal helper, pauses all game sounds.

playSounds ( ) : void

Internal helper, pauses all game sounds.

비공개 메소드들

메소드 설명
destroySounds ( bool ForceDestroy ) : void

Called by FlxGame on state changes to stop and destroy sounds. @param ForceDestroy Kill sounds even if they're flagged survive.

doFollow ( ) : void

Internal function that updates the camera and parallax scrolling.

setGameData ( FlxGame flxGame, int Width, int Height ) : void

Called by FlxGame to set up FlxG during FlxGame's constructor.

unfollow ( ) : void

Stops and resets the camera.

updateSounds ( ) : void

Called by the game loop to make sure the sounds get updated each frame.

메소드 상세

LoadContent() 공개 정적인 메소드

public static LoadContent ( GraphicsDevice gd ) : void
gd GraphicsDevice
리턴 void

changeSounds() 보호된 정적인 메소드

An internal function that adjust the volume levels and the music channel after a change.
protected static changeSounds ( ) : void
리턴 void

follow() 공개 정적인 메소드

public static follow ( FlxObject Target, float Lerp ) : void
Target FlxObject
Lerp float
리턴 void

followAdjust() 공개 정적인 메소드

public static followAdjust ( float LeadX, float LeadY ) : void
LeadX float
LeadY float
리턴 void

followBounds() 공개 정적인 메소드

Specify the boundaries of the level or where the camera is allowed to move. @param MinX The smallest X value of your level (usually 0). @param MinY The smallest Y value of your level (usually 0). @param MaxX The largest X value of your level (usually the level width). @param MaxY The largest Y value of your level (usually the level height). @param UpdateWorldBounds Whether the quad tree's dimensions should be updated to match.
public static followBounds ( int MinX, int MinY, int MaxX, int MaxY ) : void
MinX int
MinY int
MaxX int
MaxY int
리턴 void

followBounds() 공개 정적인 메소드

public static followBounds ( int MinX, int MinY, int MaxX, int MaxY, bool UpdateWorldBounds ) : void
MinX int
MinY int
MaxX int
MaxY int
UpdateWorldBounds bool
리턴 void

getMuteValue() 공개 정적인 메소드

Get a number that represents the mute state that we can multiply into a sound transform. @return An unsigned integer - 0 if muted, 1 if not muted.
public static getMuteValue ( ) : int
리턴 int

log() 공개 정적인 메소드

Log data to the developer console. @param Data Anything you want to log to the console.
public static log ( string Data ) : void
Data string
리턴 void

pauseSounds() 보호된 정적인 메소드

Internal helper, pauses all game sounds.
protected static pauseSounds ( ) : void
리턴 void

play() 공개 정적인 메소드

Creates a new sound object from an embedded Class object. @param EmbeddedSound The sound you want to play. @param Volume How loud to play it (0 to 1). @param Looped Whether or not to loop this sound. @return A FlxSound object.
public static play ( string EmbeddedSound ) : FlxSound
EmbeddedSound string
리턴 FlxSound

play() 공개 정적인 메소드

public static play ( string EmbeddedSound, float Volume ) : FlxSound
EmbeddedSound string
Volume float
리턴 FlxSound

play() 공개 정적인 메소드

public static play ( string EmbeddedSound, float Volume, bool Looped ) : FlxSound
EmbeddedSound string
Volume float
Looped bool
리턴 FlxSound

playMusic() 공개 정적인 메소드

Set up and play a looping background soundtrack. @param Music The sound file you want to loop in the background. @param Volume How loud the sound should be, from 0 to 1.
public static playMusic ( string Music ) : void
Music string
리턴 void

playMusic() 공개 정적인 메소드

public static playMusic ( string Music, float Volume ) : void
Music string
Volume float
리턴 void

playSounds() 보호된 정적인 메소드

Internal helper, pauses all game sounds.
protected static playSounds ( ) : void
리턴 void

resetInput() 공개 정적인 메소드

Reset the input helper objects (useful when changing screens or states)
public static resetInput ( ) : void
리턴 void

프로퍼티 상세

Game 공개적으로 정적으로 프로퍼티

public static Game,Microsoft.Xna.Framework Game
리턴 Microsoft.Xna.Framework.Game

GameTime 공개적으로 정적으로 프로퍼티

public static GameTime,Microsoft.Xna.Framework GameTime
리턴 Microsoft.Xna.Framework.GameTime

LIBRARY_MAJOR_VERSION 공개적으로 정적으로 프로퍼티

Assign a major version to your library. Appears before the decimal in the console.
public static uint LIBRARY_MAJOR_VERSION
리턴 uint

LIBRARY_MINOR_VERSION 공개적으로 정적으로 프로퍼티

Assign a minor version to your library. Appears after the decimal in the console.
public static uint LIBRARY_MINOR_VERSION
리턴 uint

LIBRARY_NAME 공개적으로 정적으로 프로퍼티

If you build and maintain your own version of flixel, you can give it your own name here. Appears in the console.
public static string LIBRARY_NAME
리턴 string

_flxGame 보호되어 있는 정적으로 프로퍼티

Internal tracker for game object (so we can pause & unpause)
protected static FlxGame,XnaFlixel _flxGame
리턴 FlxGame

_mute 보호되어 있는 정적으로 프로퍼티

Internal flag for whether or not the game is muted.
protected static bool _mute
리턴 bool

_pause 보호되어 있는 정적으로 프로퍼티

Internal tracker for game pause state.
protected static bool _pause
리턴 bool

_scrollTarget 보호되어 있는 정적으로 프로퍼티

Internal, used to assist camera and scrolling.
protected static Vector2,Microsoft.Xna.Framework _scrollTarget
리턴 Microsoft.Xna.Framework.Vector2

_volume 보호되어 있는 정적으로 프로퍼티

Internal volume level, used for global sound control.
protected static float _volume
리턴 float

autoHandlePause 공개적으로 정적으로 프로퍼티

public static bool autoHandlePause
리턴 bool

backColor 공개적으로 정적으로 프로퍼티

public static Color,Microsoft.Xna.Framework backColor
리턴 Microsoft.Xna.Framework.Color

debug 공개적으로 정적으로 프로퍼티

Whether you are running in Debug or Release mode. Set automatically by FlxFactory during startup.
public static bool debug
리턴 bool

elapsed 공개적으로 정적으로 프로퍼티

Represents the amount of time in seconds that passed since last frame.
public static float elapsed
리턴 float

fade 공개적으로 정적으로 프로퍼티

A special effect that fades a color onto the screen. Usage: FlxG.fade.start();
public static FlxFade fade
리턴 FlxFade

flash 공개적으로 정적으로 프로퍼티

A special effect that flashes a color on the screen. Usage: FlxG.flash.start();
public static FlxFlash flash
리턴 FlxFlash

followLead 공개적으로 정적으로 프로퍼티

Used to force the camera to look ahead of the followTarget.
public static Vector2,Microsoft.Xna.Framework followLead
리턴 Microsoft.Xna.Framework.Vector2

followLerp 공개적으로 정적으로 프로퍼티

Used to smoothly track the camera as it follows.
public static float followLerp
리턴 float

followMax 공개적으로 정적으로 프로퍼티

Stores the bottom and right edges of the camera area.
public static Point,Microsoft.Xna.Framework followMax
리턴 Microsoft.Xna.Framework.Point

followMin 공개적으로 정적으로 프로퍼티

Stores the top and left edges of the camera area.
public static Point,Microsoft.Xna.Framework followMin
리턴 Microsoft.Xna.Framework.Point

followTarget 공개적으로 정적으로 프로퍼티

Tells the camera to follow this FlxCore object around.
public static FlxObject followTarget
리턴 FlxObject

gamepads 공개적으로 정적으로 프로퍼티

An array of FlxGamepad objects. Important for input!
public static FlxGamepad,XnaFlixel.data gamepads
리턴 XnaFlixel.data.FlxGamepad

getTimer 공개적으로 정적으로 프로퍼티

public static uint getTimer
리턴 uint

height 공개적으로 정적으로 프로퍼티

The height of the screen in game pixels.
public static int height
리턴 int

keys 공개적으로 정적으로 프로퍼티

A reference to a FlxKeyboard object. Important for input!
public static FlxKeyboard keys
리턴 FlxKeyboard

level 공개적으로 정적으로 프로퍼티

public static int level
리턴 int

levels 공개적으로 정적으로 프로퍼티

FlxG.levels and FlxG.scores are generic global variables that can be used for various cross-state stuff.
public static List levels
리턴 List

maxElapsed 공개적으로 정적으로 프로퍼티

Essentially locks the framerate to a minimum value - any slower and you'll get slowdown instead of frameskip; default is 1/30th of a second.
public static float maxElapsed
리턴 float

mobile 공개적으로 정적으로 프로퍼티

Setting this to true will disable/skip stuff that isn't necessary for mobile platforms like Android (or Windows Phone 7). [BETA]
public static bool mobile
리턴 bool

mouse 공개적으로 정적으로 프로퍼티

A reference to a FlxMouse object. Important for input!
public static FlxMouse mouse
리턴 FlxMouse

music 공개적으로 정적으로 프로퍼티

A handy container for a background music object.
public static FlxSound music
리턴 FlxSound

quake 공개적으로 정적으로 프로퍼티

Reference to the active graphics buffer. Can also be referenced via FlxState.screen. Internal storage system to prevent graphics from being used repeatedly in memory. Access to the Kongregate high scores and achievements API. The support panel (twitter, reddit, stumbleupon, paypal, etc) visor thing A special effect that shakes the screen. Usage: FlxG.quake.start();
public static FlxQuake,XnaFlixel.data quake
리턴 XnaFlixel.data.FlxQuake

save 공개적으로 정적으로 프로퍼티

public static int save
리턴 int

saves 공개적으로 정적으로 프로퍼티

FlxG.saves is a generic bucket for storing FlxSaves so you can access them whenever you want.
public static List saves
리턴 List

score 공개적으로 정적으로 프로퍼티

public static int score
리턴 int

scores 공개적으로 정적으로 프로퍼티

public static List scores
리턴 List

scroll 공개적으로 정적으로 프로퍼티

Stores the basic parallax scrolling values.
public static Vector2,Microsoft.Xna.Framework scroll
리턴 Microsoft.Xna.Framework.Vector2

showBounds 공개적으로 정적으로 프로퍼티

Set showBounds to true to display the bounding boxes of the in-game objects.
public static bool showBounds
리턴 bool

sounds 공개적으로 정적으로 프로퍼티

A list of all the sounds being played in the game.
public static List sounds
리턴 List

timeScale 공개적으로 정적으로 프로퍼티

How fast or slow time should pass in the game; default is 1.0.
public static float timeScale
리턴 float

width 공개적으로 정적으로 프로퍼티

The width of the screen in game pixels.
public static int width
리턴 int