Show / Hide Table of Contents

Class Document

Class representing a document in-game. Internally holds a DocMiniUI and a DocFullUI as two representations of the same document.

Inheritance
System.Object
Document
NewsArticleDocument
ProposalDocument
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: GDA.GameDocuments
Assembly: Assembly-CSharp.dll
Syntax
public class Document

Constructors

Document()

Declaration
public Document()

Document(DocMiniUI, DocFullUI)

Declaration
public Document(DocMiniUI miniView, DocFullUI fullView)
Parameters
Type Name Description
DocMiniUI miniView
DocFullUI fullView

Fields

IsDragable

Whether document can dragged.

Declaration
public bool IsDragable
Field Value
Type Description
System.Boolean

Properties

fullView

The full-view of the document, used on the right area of the screen.

Declaration
public DocFullUI fullView { get; protected set; }
Property Value
Type Description
DocFullUI

isActive

Whether document is being displayed.

Declaration
public bool isActive { get; }
Property Value
Type Description
System.Boolean

isKeeping

Whether the document is mid-animation of being stowed away.

Declaration
public bool isKeeping { get; }
Property Value
Type Description
System.Boolean

isSubmittable

Whether the document can be submitted to a Proposer NPC.

Declaration
public virtual bool isSubmittable { get; }
Property Value
Type Description
System.Boolean

miniView

The mini-view of the document, used on the left area of the screen.

Declaration
public DocMiniUI miniView { get; protected set; }
Property Value
Type Description
DocMiniUI

Methods

Deselect()

Calls the DocumentManager instance to deselect the current selected document.

Declaration
public void Deselect()

GetDocumentVisibility()

Gets which UI element is visible for this document.

Declaration
public int GetDocumentVisibility()
Returns
Type Description
System.Int32

-1 for mini View, 1 for full view, and 0 for neither.

GetPosition()

Get the positon of the document relative to its anchor.

Declaration
public Vector2 GetPosition()
Returns
Type Description
UnityEngine.Vector2

Initialize(DocMiniUI, DocFullUI)

Links both the miniView and fullView monobehaviors to itself and vice versa, so that both representations can act as if it were one object.

Declaration
public void Initialize(DocMiniUI miniView, DocFullUI fullView)
Parameters
Type Name Description
DocMiniUI miniView
DocFullUI fullView

Keep()

Trigger the animation for stowing away the document.

Declaration
public void Keep()

OnBeginDrag(PointerEventData, DocumentUI)

The actual implementation of the IBeginDragHandler interface that both miniView and fullView will call.

Declaration
public virtual void OnBeginDrag(PointerEventData eventData, DocumentUI docUI)
Parameters
Type Name Description
UnityEngine.EventSystems.PointerEventData eventData

PointerEventData from the BeginDrag Event.

DocumentUI docUI

The DocumentUI that is calling this method. (miniView or fullView)

OnDrag(PointerEventData, DocumentUI)

The actual implementation of the IDragHandler interface that both miniView and fullView will call.

Declaration
public virtual void OnDrag(PointerEventData eventData, DocumentUI docUI)
Parameters
Type Name Description
UnityEngine.EventSystems.PointerEventData eventData

PointerEventData from the BeginDrag Event.

DocumentUI docUI

The DocumentUI that is calling this method. (miniView or fullView)

OnEndDrag(PointerEventData, DocumentUI)

The actual implementation of the IEndDragHandler interface that both miniView and fullView will call.

Declaration
public virtual void OnEndDrag(PointerEventData eventData, DocumentUI docUI)
Parameters
Type Name Description
UnityEngine.EventSystems.PointerEventData eventData

PointerEventData from the BeginDrag Event.

DocumentUI docUI

The DocumentUI that is calling this method. (miniView or fullView)

OnPointerClick(PointerEventData, DocumentUI)

The actual implementation of the IPointerClickHandler interface that both miniView and fullView will call.

Declaration
public virtual void OnPointerClick(PointerEventData eventData, DocumentUI docUI)
Parameters
Type Name Description
UnityEngine.EventSystems.PointerEventData eventData

PointerEventData from the BeginDrag Event.

DocumentUI docUI

The DocumentUI that is calling this method. (miniView or fullView)

OnPointerDown(PointerEventData, DocumentUI)

The actual implementation of the IPointerDownHandler interface that both miniView and fullView will call.

Declaration
public virtual void OnPointerDown(PointerEventData eventData, DocumentUI docUI)
Parameters
Type Name Description
UnityEngine.EventSystems.PointerEventData eventData

PointerEventData from the BeginDrag Event.

DocumentUI docUI

The DocumentUI that is calling this method. (miniView or fullView)

OnPointerUp(PointerEventData, DocumentUI)

The actual implementation of the IPointerUpHandler interface that both miniView and fullView will call.

Declaration
public virtual void OnPointerUp(PointerEventData eventData, DocumentUI docUI)
Parameters
Type Name Description
UnityEngine.EventSystems.PointerEventData eventData

PointerEventData from the BeginDrag Event.

DocumentUI docUI

Select()

Calls the DocumentManager instance to select the document.

Declaration
public void Select()

Submit()

Trigger the animation for submitting the document.

Declaration
public void Submit()

Table(Vector2)

Trigger the animation for tabling the document.

Declaration
public void Table(Vector2 localPosition)
Parameters
Type Name Description
UnityEngine.Vector2 localPosition

Starting positon of the animation

In This Article
Back to top Generated by DocFX