75 lines
2.1 KiB
C#
75 lines
2.1 KiB
C#
|
using EvolutStudio.tinysAPI.BaseClasses;
|
|||
|
using EvolutStudio.VRPortfolioWork.Components;
|
|||
|
|
|||
|
namespace EvolutStudio
|
|||
|
{
|
|||
|
namespace tinysAPI
|
|||
|
{
|
|||
|
namespace Extensions
|
|||
|
{
|
|||
|
public class UpdaterExtensionPresenter : BaseClassPresenter
|
|||
|
{
|
|||
|
#region Public Attributes
|
|||
|
|
|||
|
// Add your public attributes
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Private Attributes
|
|||
|
|
|||
|
// Add your private attributes
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Public Functions
|
|||
|
|
|||
|
// implementation of notify
|
|||
|
override public void Notify(string notification, UnityEngine.Object DataReference = null)
|
|||
|
{
|
|||
|
if (modulInstance.Model.Validate(notification))
|
|||
|
{
|
|||
|
modulInstance.View.FireValidationSucceededEvent(notification);
|
|||
|
}
|
|||
|
else
|
|||
|
{
|
|||
|
modulInstance.View.FireValidationFailedEvent(notification);
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
// implementation of init given component
|
|||
|
public override void InitComponent(BaseClassComponent component)
|
|||
|
{
|
|||
|
CopyValues(component);
|
|||
|
}
|
|||
|
|
|||
|
// implementation of update given component
|
|||
|
public override void UpdateComponent(BaseClassComponent component)
|
|||
|
{
|
|||
|
CopyValues(component);
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Private Functions
|
|||
|
|
|||
|
// private function to copy all values from model to subview
|
|||
|
private void CopyValues(BaseClassComponent component)
|
|||
|
{
|
|||
|
//TODO
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Unity Events
|
|||
|
|
|||
|
// Use this for initialization
|
|||
|
void Start()
|
|||
|
{
|
|||
|
gameObject.GetComponentInParent<BaseClassExtension>().RegisterPresenter(this);
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
}
|