Show / Hide Table of Contents

    Interface IObjectFactory

    A factory for creating objects, characters, and masked hotspots.

    Namespace: AGS.API
    Assembly: AGS.API.dll
    Syntax
    public interface IObjectFactory

    Methods

    | Improve this Doc View Source

    GetAdventureObject(String, IRoom, String[], String[])

    Creates a new object with IHotspotComponent, which supports have reaction to character interactions (command verbs). TODO: invent a new type name for this. It can be IAdventureObject or something simple like IHotspot.

    Declaration
    IObject GetAdventureObject(string id, IRoom room = null, string[] sayWhenLook = null, string[] sayWhenInteract = null)
    Parameters
    Type Name Description
    System.String id

    A unique identifier for the object (this has to be globally unique across all entities).

    IRoom room

    The room to place the object in.

    System.String[] sayWhenLook

    An optional list of things that the player will say (one after the other) when looking on the object.

    System.String[] sayWhenInteract

    An optional list of things that the player will say (one after the other) when interacting with the object.

    Returns
    Type Description
    IObject

    The object.

    | Improve this Doc View Source

    GetCharacter(String, IOutfit, IAnimationComponent, IRoom)

    Creates a new character

    Declaration
    ICharacter GetCharacter(string id, IOutfit outfit, IAnimationComponent innerContainer, IRoom room = null)
    Parameters
    Type Name Description
    System.String id

    A unique identifier for the object (this has to be globally unique across all entities).

    IOutfit outfit

    An animation outfit for the character (this can be created from the outfit factory).

    IAnimationComponent innerContainer

    An animation container for the character

    IRoom room

    The room to place the character in.

    Returns
    Type Description
    ICharacter

    The character.

    | Improve this Doc View Source

    GetCharacter(String, IOutfit, IRoom, String[], String[])

    Creates a new character

    Declaration
    ICharacter GetCharacter(string id, IOutfit outfit, IRoom room = null, string[] sayWhenLook = null, string[] sayWhenInteract = null)
    Parameters
    Type Name Description
    System.String id

    A unique identifier for the object (this has to be globally unique across all entities)..

    IOutfit outfit

    An animation outfit for the character (this can be created from the outfit factory).

    IRoom room

    The room to place the character in.

    System.String[] sayWhenLook

    An optional list of things that the player will say (one after the other) when looking on the character.

    System.String[] sayWhenInteract

    An optional list of things that the player will say (one after the other) when interacting with the character.

    Returns
    Type Description
    ICharacter

    The character.

    | Improve this Doc View Source

    GetHotspot(String, String, IRoom, String[], String[], String)

    Creates a new hotspot object from a bitmap mask (the hotspot text will be shown when the mouse is hovering the object if a hotspot label is in the game).

    Declaration
    IObject GetHotspot(string maskPath, string hotspot, IRoom room = null, string[] sayWhenLook = null, string[] sayWhenInteract = null, string id = null)
    Parameters
    Type Name Description
    System.String maskPath

    The path of the resource/file (see cref="IResourceLoader"/> to load the mask from.

    System.String hotspot

    The hotspot text.

    IRoom room

    The room to place the hotspot in.

    System.String[] sayWhenLook

    An optional list of things that the player will say (one after the other) when looking on the object.

    System.String[] sayWhenInteract

    An optional list of things that the player will say (one after the other) when interacting with the object.

    System.String id

    A unique identifier for the object (this has to be globally unique across all entities). If an ID is not given, the hotspot text will be used as the id.

    Returns
    Type Description
    IObject

    The hotspot.

    | Improve this Doc View Source

    GetHotspotAsync(String, String, IRoom, String[], String[], String)

    Creates a new hotspot object from a bitmap mask asynchronously (the hotspot text will be shown when the mouse is hovering the object if a hotspot label is in the game).

    Declaration
    Task<IObject> GetHotspotAsync(string maskPath, string hotspot, IRoom room = null, string[] sayWhenLook = null, string[] sayWhenInteract = null, string id = null)
    Parameters
    Type Name Description
    System.String maskPath

    The path of the resource/file (IResourceLoader to load the mask from.

    System.String hotspot

    The hotspot text.

    IRoom room

    The room to place the hotspot in.

    System.String[] sayWhenLook

    An optional list of things that the player will say (one after the other) when looking on the object.

    System.String[] sayWhenInteract

    An optional list of things that the player will say (one after the other) when interacting with the object.

    System.String id

    A unique identifier for the object (this has to be globally unique across all entities). If an ID is not given, the hotspot text will be used as the id.

    Returns
    Type Description
    System.Threading.Tasks.Task<IObject>

    The hotspot.

    | Improve this Doc View Source

    GetObject(String, IRoom)

    Creates a new object.

    Declaration
    IObject GetObject(string id, IRoom room = null)
    Parameters
    Type Name Description
    System.String id

    A unique identifier for the object (this has to be globally unique across all entities).

    IRoom room

    The room to place the object in.

    Returns
    Type Description
    IObject

    The object.

    • Improve this Doc
    • View Source
    Back to top Generated by DocFX