Show / Hide Table of Contents

Class RoomControl

Base class for displaying rooms in the level graph editor window.

Inheritance
System.Object
RoomControl
Namespace: Edgar.Unity
Assembly: cs.temp.dll.dll
Syntax
public class RoomControl

Fields

DefaultHeight

Default height of the room control.

Declaration
public static readonly float DefaultHeight
Field Value
Type Description
System.Single

DefaultWidth

Default width of the room control.

Declaration
public static readonly float DefaultWidth
Field Value
Type Description
System.Single

Properties

Room

The room that this control represents/displays.

Declaration
public RoomBase Room { get; }
Property Value
Type Description
RoomBase

Methods

Draw(Vector2, Single)

Draws the room control.

Declaration
public virtual void Draw(Vector2 gridOffset, float zoom)
Parameters
Type Name Description
Vector2 gridOffset

Offset of the level graph editor window.

System.Single zoom

Zoom of the level graph editor window.

Remarks

It is advised to use the GetRect(Vector2, Single) method for the base position and shape of the control.

GetRect(Vector2, Single)

Returns the Rect that will be used for determining if a user interacted with the control.

Declaration
public virtual Rect GetRect(Vector2 gridOffset, float zoom)
Parameters
Type Name Description
Vector2 gridOffset

Offset of the level graph editor window.

System.Single zoom

Zoom of the level graph editor window.

Returns
Type Description
Rect

Initialize(RoomBase)

Declaration
public void Initialize(RoomBase room)
Parameters
Type Name Description
RoomBase room

IsSelected()

Checks if the room is currently selected in the editor.

Declaration
protected virtual bool IsSelected()
Returns
Type Description
System.Boolean
In This Article
Back to top Generated by DocFX