91 lines
2.9 KiB
C#
91 lines
2.9 KiB
C#
|
using System;
|
|||
|
using UnityEngine;
|
|||
|
using EvolutStudio.tinysAPI.BaseClasses;
|
|||
|
|
|||
|
namespace EvolutStudio
|
|||
|
{
|
|||
|
namespace tinysAPI
|
|||
|
{
|
|||
|
namespace Extensions
|
|||
|
{
|
|||
|
public class UpdaterExtensionModel : BaseClassModel
|
|||
|
{
|
|||
|
#region Public Attributes
|
|||
|
|
|||
|
// reference of the current tooltip state
|
|||
|
public bool currentTooltipState { get { return _currentTooltipState; } }
|
|||
|
|
|||
|
public static class TooltipState
|
|||
|
{
|
|||
|
public static bool show = true;
|
|||
|
public static bool hide = false;
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Private Attributes
|
|||
|
|
|||
|
// hidden reference for the current Tooltip state
|
|||
|
private bool _currentTooltipState = TooltipState.hide;
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Public Functions
|
|||
|
|
|||
|
// implementation of validate
|
|||
|
public override bool Validate(string notification, UnityEngine.Object DataReference = null)
|
|||
|
{
|
|||
|
// check notification for validation
|
|||
|
if (notification.Equals(BaseClassNotification.POINTERCLICKEVENT))
|
|||
|
{
|
|||
|
//TODO
|
|||
|
}
|
|||
|
else if (notification.Equals(BaseClassNotification.POINTERENTEREVENT))
|
|||
|
{
|
|||
|
// set the current tooltip state to show
|
|||
|
_currentTooltipState = TooltipState.show;
|
|||
|
}
|
|||
|
else if (notification.Equals(BaseClassNotification.POINTEREXITEVENT))
|
|||
|
{
|
|||
|
// set the current tooltip state to hide
|
|||
|
_currentTooltipState = TooltipState.hide;
|
|||
|
}
|
|||
|
else if (notification.Equals(BaseClassNotification.MOVE))
|
|||
|
{
|
|||
|
//TODO
|
|||
|
}
|
|||
|
else if (notification.Equals(BaseClassNotification.POINTERDOWN))
|
|||
|
{
|
|||
|
//TODO
|
|||
|
Debug.Log("Start Moving Cube");
|
|||
|
}
|
|||
|
else if (notification.Equals(BaseClassNotification.POINTERUP))
|
|||
|
{
|
|||
|
//TODO
|
|||
|
Debug.Log("Stop Moving Cube");
|
|||
|
}
|
|||
|
// because there is no condition in this simple demo, return true
|
|||
|
return true;
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Private Functions
|
|||
|
|
|||
|
// Add your private functions
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Unity Events
|
|||
|
|
|||
|
// Use this for initialization
|
|||
|
void Awake()
|
|||
|
{
|
|||
|
gameObject.GetComponentInParent<BaseClassExtension>().RegisterModel(this);
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
}
|