Table of Contents

Class SpriteCell

Namespace
Gamelogic.Grids
Assembly
Assembly-CSharp.dll

A tile cell that uses a Unity sprite to render.

[Version(1, 8, 0)]
[AddComponentMenu("Gamelogic/Cells/SpriteCell")]
public class SpriteCell : TileCell, IColorableCell, ICell, IGLScriptableObject
Inheritance
SpriteCell
Implements
Derived
Inherited Members
MonoBehaviour.IsInvoking()
MonoBehaviour.StopCoroutine(Coroutine)
MonoBehaviour.StopAllCoroutines()
MonoBehaviour.runInEditMode
Component.GetComponent<T>()
Component.GetComponentInChildren<T>()
Component.GetComponentsInChildren<T>()
Component.GetComponentsInParent<T>()
Component.transform
Component.gameObject
Component.tag
Object.Instantiate(Object, Vector3, Quaternion)
Object.Instantiate(Object)
Object.Instantiate(Object, Transform)
Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
Object.Instantiate<T>(T, Transform)
Object.Destroy(Object)
Object.DestroyImmediate(Object)
Object.DestroyObject(Object)
Object.FindObjectsOfType<T>()
Object.name
Object.hideFlags
Extension Methods

Properties

Color

The main color of the tile.

This is used to set the color of tiles dynamically.

public override Color Color { get; set; }

Property Value

Color

Dimensions

The 2D dimensions of the tile. For 3D objects, this is the dimensions along the same plane as the 2D grid.

public override Vector2 Dimensions { get; }

Property Value

Vector2

FrameIndex

Sets the current sprite by indexing into the list of sprites set up in the inspector.

public int FrameIndex { get; set; }

Property Value

int

HighlightOn

public bool HighlightOn { get; set; }

Property Value

bool

SpriteRenderer

protected SpriteRenderer SpriteRenderer { get; }

Property Value

SpriteRenderer

Methods

AddAngle(float)

Adds the given angle to the current angle of the tile. If the tile is in the XY plane, it will be added to the Z angle.

public override void AddAngle(float angle)

Parameters

angle float

Awake()

public void Awake()

SetAngle(float)

Sets the angle of the tile. If the tile is in the XY plane, the angle will be the Z angle.

public override void SetAngle(float angle)

Parameters

angle float

In degrees.

__UpdatePresentation(bool)

This methods is called by the editor, and is to update the cell representation to it's current state.

(Typically, this is necessary for serialized fields that affect the presentation.For example, the color may be saved, but the actual object may reset it's color).

public override void __UpdatePresentation(bool forceUpdate)

Parameters

forceUpdate bool