Skip to content

Commit

Permalink
re-org of folders and add editor asmdef
Browse files Browse the repository at this point in the history
  • Loading branch information
push-pop committed Oct 13, 2020
1 parent fce2fb7 commit 1cff298
Show file tree
Hide file tree
Showing 128 changed files with 503 additions and 456 deletions.
17 changes: 17 additions & 0 deletions Assets/Unity-MVVM/Editor/Unity-MVVM.Editor.asmdef
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "Unity-MVVM-Editor",
"references": [
"GUID:889b57d9d5be29f419d21d9c7a4b24fa"
],
"includePlatforms": [
"Editor"
],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": true,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}
7 changes: 7 additions & 0 deletions Assets/Unity-MVVM/Editor/Unity-MVVM.Editor.asmdef.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

39 changes: 39 additions & 0 deletions Assets/Unity-MVVM/Samples/Basic Usage/DataBindings/ViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,48 @@ public DateTime Now
[SerializeField]
private DateTime _now;

public Color DemoBackgroundColor
{
get { return _demoBackgroundColor; }
set
{
if (value != _demoBackgroundColor)
{
_demoBackgroundColor = value;
NotifyPropertyChanged(nameof(DemoBackgroundColor));
}
}
}

[SerializeField]
private Color _demoBackgroundColor = new Color(192f / 255f, 100f / 255f, 67f / 255f);


public TimeSpan TimerVal
{
get { return _timerVal; }
set
{
if (value != _timerVal)
{
_timerVal = value;
NotifyPropertyChanged(nameof(TimerVal));
}
}
}

[SerializeField]
private TimeSpan _timerVal;


#endregion

#region public Methods
public void SetRandomBackgroundColor()
{
DemoBackgroundColor = UnityEngine.Random.ColorHSV();
}

public void NextPage()
{
CurrPage++;
Expand All @@ -176,6 +214,7 @@ private void Update()
CurrTime = Time.time;
IsMouseClicked = Input.GetMouseButton(0);
Now = DateTime.Now;
TimerVal += TimeSpan.FromSeconds(Time.deltaTime);
}
}
}
Loading

0 comments on commit 1cff298

Please sign in to comment.