using UnityEngine;
namespace TowerDefense.UI
{
///
/// A class for controlling conditional motion of the canvas
///
[RequireComponent(typeof(Canvas))]
public class MovingCanvas : MonoBehaviour
{
///
/// The RectTransform used to check against the screen bounds
///
public RectTransform content;
///
/// To offset the position the canvas is placed at
///
public Vector2 offset;
///
/// The attached canvas
///
Canvas m_Canvas;
///
/// Property for disabling and enabling the attached canvas
///
public bool canvasEnabled
{
get
{
if (m_Canvas == null)
{
m_Canvas = GetComponent