Merge branch 'develop' into dhain
# Conflicts: # ProjectSettings/RiderScriptEditorPersistedState.asset
This commit is contained in:
commit
fb9aa4e349
4 changed files with 66 additions and 16 deletions
|
|
@ -7,7 +7,9 @@ using UnityEngine.Events;
|
||||||
public class DayController : MonoBehaviour {
|
public class DayController : MonoBehaviour {
|
||||||
private int dayCount = 0;
|
private int dayCount = 0;
|
||||||
private static UnityEvent newDayEvent;
|
private static UnityEvent newDayEvent;
|
||||||
|
public static UnityEvent NewDayEvent => newDayEvent;
|
||||||
|
|
||||||
|
|
||||||
private void OnMouseDown() {
|
private void OnMouseDown() {
|
||||||
newDay();
|
newDay();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
38
Assets/Scripts/PlayerController.cs
Normal file
38
Assets/Scripts/PlayerController.cs
Normal file
|
|
@ -0,0 +1,38 @@
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
public class PlayerController : MonoBehaviour {
|
||||||
|
private List<Item> inventory;
|
||||||
|
private int money;
|
||||||
|
private UsableItem selectedItem;
|
||||||
|
|
||||||
|
private static PlayerController instance;
|
||||||
|
|
||||||
|
public int startMoney = 100;
|
||||||
|
|
||||||
|
public static PlayerController getInstance() {
|
||||||
|
return instance;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Start is called before the first frame update
|
||||||
|
void Start()
|
||||||
|
{
|
||||||
|
inventory ??= new List<Item>();
|
||||||
|
money = startMoney;
|
||||||
|
instance = this;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update is called once per frame
|
||||||
|
void Update()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSelectedItem(UsableItem item) {
|
||||||
|
selectedItem = item;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
25
Assets/Scripts/UsableItem.cs
Normal file
25
Assets/Scripts/UsableItem.cs
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
public class UsableItem : Item, IUsable
|
||||||
|
{
|
||||||
|
// Start is called before the first frame update
|
||||||
|
void Start()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update is called once per frame
|
||||||
|
void Update()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public UsableItem(string displayName, string description, int id) : base(displayName, description, id) {
|
||||||
|
}
|
||||||
|
|
||||||
|
public void select() {
|
||||||
|
throw new System.NotImplementedException();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,15 +0,0 @@
|
||||||
%YAML 1.1
|
|
||||||
%TAG !u! tag:unity3d.com,2011:
|
|
||||||
--- !u!114 &1
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 61
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 0}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 0}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier: Unity.Rider.Editor:Packages.Rider.Editor:RiderScriptEditorPersistedState
|
|
||||||
lastWriteTicks: -8585494757829068137
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue