Show / Hide Table of Contents

    Interface IOutfitComponent

    Gives an entity the ability to have an outfit (and be able to change outfits).

    Inherited Members
    IComponent.Name
    IComponent.Entity
    IComponent.RegistrationType
    IComponent.Init(IEntity, Type)
    IComponent.AfterInit()
    System.IDisposable.Dispose()
    System.ComponentModel.INotifyPropertyChanged.PropertyChanged
    Namespace: AGS.API
    Assembly: AGS.API.dll
    Syntax
    public interface IOutfitComponent : IComponent, IDisposable, INotifyPropertyChanged

    Properties

    | Improve this Doc View Source

    Outfit

    Gets or sets the outfit for the entity.

    Declaration
    IOutfit Outfit { get; set; }
    Property Value
    Type Description
    IOutfit

    The outfit.

    Examples
    await cHero.SayAsync("Let's try on this cool hat."); //Hero speaks with the normal outfit- without the hat
    var normalOutfit = cHero.Outfit; //Saving the current outfit so we can wear it back later
    cHero.Outfit = outfitWithHat;
    await cHero.SayAsync("Hmm, it looks nice, but not sure if it's comfortable."); //Character's animation now uses the hat for speaking.
    await cHero.WalkAsync(walkPoint); //Character's walk animation now includes the hat.
    cHero.Outfit = normalOutfit;
    await cHero.SayAsync("Yeah, it's not comfortable, I took it down."); //Character's animation is now again without the hat
    See Also
    IOutfit
    | Improve this Doc View Source

    SwitchToIdleWhenSwitchingOutfit

    If set to true (which is the default), switching to a new outfit will automatically start the idle animation for the new outfit, if the new outfit has an idle animation. You can turn this off to set your own behavior instead.

    Declaration
    bool SwitchToIdleWhenSwitchingOutfit { get; set; }
    Property Value
    Type Description
    System.Boolean
    • Improve this Doc
    • View Source
    Back to top Generated by DocFX