Interface IOutfit
An outfit is a collection of animations that are associated with a character. The collection can be swapped with another collection when the character changes his look.
Namespace: AGS.API
Assembly: AGS.API.dll
Syntax
public interface IOutfit
Examples
Say your player can wear a jacket. You can create two outfits in advance, one with a jacket and the other without. Each outfit will have different walk, idle and speak animations (one with a jacket and the other without).
Properties
| Improve this Doc View SourceItem[String]
Gets or sets an animation that will be associated with a specific key for this outfit.
Some built in keys are expected by some components to change animations (idle, walk, speak).
Custom animations can be added and accessed from the outfit as needed.
cPlayer.Outfit[AGSOutfit.Walk] = aCrazyWalkAnimation;
cPlayer.Outfit[AGSOutfit.Idle] = aPlayingYoyoAnimation;
cPlayer.Outfit[AGSOutfit.Speak] = aScaryAnimation;
cPlayer.Outfit["Jump"] = aJumpAnimation;
await cPlayer.WalkAsync(100, 200); //The crazy walk animation will now be used for walking to (100,200).
Thread.Sleep(5000); //The player has finished walking, and sitting idle for 5 seconds during which the playing yoyo animation is playing
await cPlayer.SayAsync("Do I scare you?"); //The character will speak with the scary animation
cPlayer.StartAnimation(cPlayer.Outfit["Jump"].Left); //The character will do a jump left animation.
Declaration
IDirectionalAnimation this[string key] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
System.String | key | Key. |
Property Value
Type | Description |
---|---|
IDirectionalAnimation |
Methods
| Improve this Doc View SourceToDictionary()
Gets all the animations as a dictionary;
Declaration
IDictionary<string, IDirectionalAnimation> ToDictionary()
Returns
Type | Description |
---|---|
System.Collections.Generic.IDictionary<System.String, IDirectionalAnimation> | The dictionary. |