// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus). // It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE) using MoonSharp.Interpreter; namespace Fungus { /// /// Types of display operations supported by portraits /// public enum DisplayType { None, Show, Hide, Replace, MoveToFront } /// /// Directions that character portraits can face. /// public enum FacingDirection { None, Left, Right } /// /// Offset direction for position. /// public enum PositionOffset { None, OffsetLeft, OffsetRight } /// /// Controls the Portrait sprites on stage /// public interface IPortraitController { /// /// Using all portrait options available, run any portrait command. /// /// Portrait Options /// The function that will run once the portrait command finishes void RunPortraitCommand(PortraitOptions options, System.Action onComplete); /// /// Moves Character in front of other characters on stage /// void MoveToFront(Character character); /// /// Moves Character in front of other characters on stage /// void MoveToFront(PortraitOptions options); /// /// Shows character at a named position in the stage /// /// /// Named position on stage void Show(Character character, string position); /// /// Shows character moving from a position to a position /// /// /// /// Where the character will appear /// Where the character will move to void Show(Character character, string portrait, string fromPosition, string toPosition); /// /// From lua, you can pass an options table with named arguments /// example: /// stage.show{character=jill, portrait="happy", fromPosition="right", toPosition="left"} /// Any option available in the PortraitOptions is available from Lua /// /// Moonsharp Table void Show(Table optionsTable); /// /// Show portrait with the supplied portrait options /// /// void Show(PortraitOptions options); /// /// Simple show command that shows the character with an available named portrait /// /// Character to show /// Named portrait to show for the character, i.e. "angry", "happy", etc void ShowPortrait(Character character, string portrait); /// /// Simple character hide command /// /// Character to hide void Hide(Character character); /// /// Move the character to a position then hide it /// /// Character to hide /// Where the character will disapear to void Hide(Character character, string toPosition); /// /// From lua, you can pass an options table with named arguments /// example: /// stage.hide{character=jill, toPosition="left"} /// Any option available in the PortraitOptions is available from Lua /// /// Moonsharp Table void Hide(Table optionsTable); /// /// Hide portrait with provided options /// void Hide(PortraitOptions options); } }