4 changed files with 120 additions and 39 deletions
@ -0,0 +1,63 @@ |
|||||||
|
using UnityEngine; |
||||||
|
using UnityEngine.UI; |
||||||
|
using System.Collections.Generic; |
||||||
|
|
||||||
|
namespace Fungus |
||||||
|
{ |
||||||
|
/// <summary> |
||||||
|
/// Define a set of screen positions where character sprites can be displayed. |
||||||
|
/// </summary> |
||||||
|
public interface IStage |
||||||
|
{ |
||||||
|
/// <summary> |
||||||
|
/// Canvas object containing the stage positions. |
||||||
|
/// </summary> |
||||||
|
Canvas PortraitCanvas { get; } |
||||||
|
|
||||||
|
/// <summary> |
||||||
|
/// Dim portraits when a character is not speaking. |
||||||
|
/// </summary> |
||||||
|
bool DimPortraits { get; set; } |
||||||
|
|
||||||
|
/// <summary> |
||||||
|
/// Duration for fading character portraits in / out. |
||||||
|
/// </summary> |
||||||
|
float FadeDuration { get; set; } |
||||||
|
|
||||||
|
/// <summary> |
||||||
|
/// Duration for moving characters to a new position. |
||||||
|
/// </summary> |
||||||
|
float MoveDuration { get; set; } |
||||||
|
|
||||||
|
/// <summary> |
||||||
|
/// Ease type for the fade tween. |
||||||
|
/// </summary> |
||||||
|
LeanTweenType FadeEaseType { get; } |
||||||
|
|
||||||
|
/// <summary> |
||||||
|
/// Constant offset to apply to portrait position. |
||||||
|
/// </summary> |
||||||
|
Vector2 ShiftOffset { get; } |
||||||
|
|
||||||
|
/// <summary> |
||||||
|
/// The position object where characters appear by default. |
||||||
|
/// </summary> |
||||||
|
Image DefaultPosition { get; } |
||||||
|
|
||||||
|
/// <summary> |
||||||
|
/// List of stage position rect transforms in the stage. |
||||||
|
/// </summary> |
||||||
|
List<RectTransform> Positions { get; } |
||||||
|
|
||||||
|
/// <summary> |
||||||
|
/// List of currently active characters on the stage. |
||||||
|
/// </summary> |
||||||
|
List<Character> CharactersOnStage { get; } |
||||||
|
|
||||||
|
/// <summary> |
||||||
|
/// Searches the stage's named positions |
||||||
|
/// If none matches the string provided, give a warning and return a new RectTransform |
||||||
|
/// </summary> |
||||||
|
RectTransform GetPosition(string positionString); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,12 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: a88bde623f95a46e49febd46fe50b19c |
||||||
|
timeCreated: 1473689190 |
||||||
|
licenseType: Free |
||||||
|
MonoImporter: |
||||||
|
serializedVersion: 2 |
||||||
|
defaultReferences: [] |
||||||
|
executionOrder: 0 |
||||||
|
icon: {instanceID: 0} |
||||||
|
userData: |
||||||
|
assetBundleName: |
||||||
|
assetBundleVariant: |
Loading…
Reference in new issue