C# 클래스 SmashBros.Controllers.ImageController

ImageController Controls one image but can have many positions And different animations on differente positions
상속: Controller
파일 보기 프로젝트 열기: Grutn/TDT4240-X2 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
OriginDefault Vector2
ScaleDefault float

공개 메소드들

메소드 설명
AddPosition ( Vector2 pos, int posId = -1 ) : ImageModel
AddPosition ( float x, float y, int posId = -1 ) : ImageModel
Animate ( ImageModel model, Vector2 toPos, float timeInMs, bool loop, float toScale = 1f ) : void
Animate ( ImageModel model, float toX, float toY, float timeInMs, bool loop = false, float toScale = 1f ) : void

Animates texture at positionIndex

Animate ( float toX, float toY, float timeInMs, bool loop = false, float scale = 1f ) : void
Animate ( int posIndex, Vector2 toPos, float timeInMs, bool loop = false, float scale = 1f ) : void
Animate ( int posIndex, float toX, float toY, float timeInMs, bool loop = false, float scale = 1f ) : void
AnimateFrame ( ImageModel model, int startFrame, int endFrame, int fps, bool loop = true ) : void
AnimatePos ( ImageModel model, float toX, float toY, float timeInMs, bool loop = false ) : void

Annimates the given model to the given position(x,y)

AnimatePos ( float toX, float toY, float timeInMs, bool loop = false ) : void

Anniates the first model (if exists) instance to given position(x,y)

AnimateScale ( ImageModel model, float toScale, float timeInMs, bool loop = false ) : void

Annimates the given model to the given scale

AnimateScale ( float toScale, float timeInMs, bool loop = false ) : void

Anniates the first model(if exists) instance to given scale

AnimateScale ( int posIndex, float scale, float time, bool loop = false ) : void
Deactivate ( ) : void
EmptyList ( ) : void
GetAt ( int index ) : ImageModel

Gets the model at index

ImageController ( ScreenManager screen, string assetName, Vector2 pos, int layer, bool staticPosition = false ) : System
ImageController ( ScreenManager screen, string assetName, int layer, bool staticPosition = false ) : System
Load ( Microsoft.Xna.Framework.Content.ContentManager content ) : void
OnNext ( GameStateManager value ) : void
RemoveId ( int id ) : void
RemovePosition ( ImageModel pos ) : void
RemovePosition ( int index ) : void
SetFps ( ImageModel model, int fps ) : void
SetFps ( int fps ) : void

Sets frames per second for first instance in models

SetFrame ( ImageModel model, int frame ) : void

Set current frame at given image model

SetFrame ( int frame ) : void

Set frame at first instance in model list if exists

SetFrameRectangle ( int widht, int height ) : void
SetPosition ( Vector2 pos ) : ImageModel

Remove all other image models and create new model with position

SetPosition ( int x, int y ) : ImageModel

Remove all other image models and create new model with position

Unload ( ) : void
Update ( GameTime gameTime ) : void

비공개 메소드들

메소드 설명
updateAnimation ( GameTime gameTime, ImageModel model ) : bool

메소드 상세

AddPosition() 공개 메소드

public AddPosition ( Vector2 pos, int posId = -1 ) : ImageModel
pos Vector2
posId int
리턴 SmashBros.Models.ImageModel

AddPosition() 공개 메소드

public AddPosition ( float x, float y, int posId = -1 ) : ImageModel
x float
y float
posId int
리턴 SmashBros.Models.ImageModel

Animate() 공개 메소드

public Animate ( ImageModel model, Vector2 toPos, float timeInMs, bool loop, float toScale = 1f ) : void
model SmashBros.Models.ImageModel
toPos Vector2
timeInMs float
loop bool
toScale float
리턴 void

Animate() 공개 메소드

Animates texture at positionIndex
public Animate ( ImageModel model, float toX, float toY, float timeInMs, bool loop = false, float toScale = 1f ) : void
model SmashBros.Models.ImageModel
toX float
toY float
timeInMs float Time to use to animate
loop bool
toScale float
리턴 void

Animate() 공개 메소드

public Animate ( float toX, float toY, float timeInMs, bool loop = false, float scale = 1f ) : void
toX float
toY float
timeInMs float
loop bool
scale float
리턴 void

Animate() 공개 메소드

public Animate ( int posIndex, Vector2 toPos, float timeInMs, bool loop = false, float scale = 1f ) : void
posIndex int
toPos Vector2
timeInMs float
loop bool
scale float
리턴 void

Animate() 공개 메소드

public Animate ( int posIndex, float toX, float toY, float timeInMs, bool loop = false, float scale = 1f ) : void
posIndex int
toX float
toY float
timeInMs float
loop bool
scale float
리턴 void

AnimateFrame() 공개 메소드

public AnimateFrame ( ImageModel model, int startFrame, int endFrame, int fps, bool loop = true ) : void
model SmashBros.Models.ImageModel
startFrame int
endFrame int
fps int
loop bool
리턴 void

AnimatePos() 공개 메소드

Annimates the given model to the given position(x,y)
public AnimatePos ( ImageModel model, float toX, float toY, float timeInMs, bool loop = false ) : void
model SmashBros.Models.ImageModel
toX float
toY float
timeInMs float
loop bool
리턴 void

AnimatePos() 공개 메소드

Anniates the first model (if exists) instance to given position(x,y)
public AnimatePos ( float toX, float toY, float timeInMs, bool loop = false ) : void
toX float
toY float
timeInMs float
loop bool
리턴 void

AnimateScale() 공개 메소드

Annimates the given model to the given scale
public AnimateScale ( ImageModel model, float toScale, float timeInMs, bool loop = false ) : void
model SmashBros.Models.ImageModel
toScale float
timeInMs float
loop bool
리턴 void

AnimateScale() 공개 메소드

Anniates the first model(if exists) instance to given scale
public AnimateScale ( float toScale, float timeInMs, bool loop = false ) : void
toScale float
timeInMs float
loop bool
리턴 void

AnimateScale() 공개 메소드

public AnimateScale ( int posIndex, float scale, float time, bool loop = false ) : void
posIndex int
scale float
time float
loop bool
리턴 void

Deactivate() 공개 메소드

public Deactivate ( ) : void
리턴 void

EmptyList() 공개 메소드

public EmptyList ( ) : void
리턴 void

GetAt() 공개 메소드

Gets the model at index
public GetAt ( int index ) : ImageModel
index int
리턴 SmashBros.Models.ImageModel

ImageController() 공개 메소드

public ImageController ( ScreenManager screen, string assetName, Vector2 pos, int layer, bool staticPosition = false ) : System
screen SmashBros.MySystem.ScreenManager
assetName string
pos Vector2
layer int
staticPosition bool
리턴 System

ImageController() 공개 메소드

public ImageController ( ScreenManager screen, string assetName, int layer, bool staticPosition = false ) : System
screen SmashBros.MySystem.ScreenManager
assetName string
layer int
staticPosition bool
리턴 System

Load() 공개 메소드

public Load ( Microsoft.Xna.Framework.Content.ContentManager content ) : void
content Microsoft.Xna.Framework.Content.ContentManager
리턴 void

OnNext() 공개 메소드

public OnNext ( GameStateManager value ) : void
value GameStateManager
리턴 void

RemoveId() 공개 메소드

public RemoveId ( int id ) : void
id int
리턴 void

RemovePosition() 공개 메소드

public RemovePosition ( ImageModel pos ) : void
pos SmashBros.Models.ImageModel
리턴 void

RemovePosition() 공개 메소드

public RemovePosition ( int index ) : void
index int
리턴 void

SetFps() 공개 메소드

public SetFps ( ImageModel model, int fps ) : void
model SmashBros.Models.ImageModel
fps int
리턴 void

SetFps() 공개 메소드

Sets frames per second for first instance in models
public SetFps ( int fps ) : void
fps int
리턴 void

SetFrame() 공개 메소드

Set current frame at given image model
public SetFrame ( ImageModel model, int frame ) : void
model SmashBros.Models.ImageModel
frame int
리턴 void

SetFrame() 공개 메소드

Set frame at first instance in model list if exists
public SetFrame ( int frame ) : void
frame int
리턴 void

SetFrameRectangle() 공개 메소드

public SetFrameRectangle ( int widht, int height ) : void
widht int
height int
리턴 void

SetPosition() 공개 메소드

Remove all other image models and create new model with position
public SetPosition ( Vector2 pos ) : ImageModel
pos Vector2
리턴 SmashBros.Models.ImageModel

SetPosition() 공개 메소드

Remove all other image models and create new model with position
public SetPosition ( int x, int y ) : ImageModel
x int
y int
리턴 SmashBros.Models.ImageModel

Unload() 공개 메소드

public Unload ( ) : void
리턴 void

Update() 공개 메소드

public Update ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
리턴 void

프로퍼티 상세

OriginDefault 공개적으로 프로퍼티

Default origin point
public Vector2 OriginDefault
리턴 Vector2

ScaleDefault 공개적으로 프로퍼티

Default scale when add a position
public float ScaleDefault
리턴 float