Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
commit
207d07b026
6 changed files with 26 additions and 23 deletions
|
|
@ -72,8 +72,8 @@ SpriteRenderer:
|
||||||
m_AutoUVMaxDistance: 0.5
|
m_AutoUVMaxDistance: 0.5
|
||||||
m_AutoUVMaxAngle: 89
|
m_AutoUVMaxAngle: 89
|
||||||
m_LightmapParameters: {fileID: 0}
|
m_LightmapParameters: {fileID: 0}
|
||||||
m_SortingLayerID: 0
|
m_SortingLayerID: -2016319409
|
||||||
m_SortingLayer: 0
|
m_SortingLayer: 1
|
||||||
m_SortingOrder: 0
|
m_SortingOrder: 0
|
||||||
m_Sprite: {fileID: 7482667652216324306, guid: 311925a002f4447b3a28927169b83ea6, type: 3}
|
m_Sprite: {fileID: 7482667652216324306, guid: 311925a002f4447b3a28927169b83ea6, type: 3}
|
||||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
|
@ -121,6 +121,6 @@ MonoBehaviour:
|
||||||
m_GameObject: {fileID: 4752245148499717901}
|
m_GameObject: {fileID: 4752245148499717901}
|
||||||
m_Enabled: 1
|
m_Enabled: 1
|
||||||
m_EditorHideFlags: 0
|
m_EditorHideFlags: 0
|
||||||
m_Script: {fileID: 11500000, guid: 9a992c82c9da0cd4f8759894ddfd5fb3, type: 3}
|
m_Script: {fileID: 11500000, guid: 99a22f4d69ce79542adc91bba6943f86, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
|
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: 7dcb0c75c1d32a949af7eb4303f3b6a6
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
|
|
@ -4,24 +4,28 @@ using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.Events;
|
using UnityEngine.Events;
|
||||||
|
|
||||||
public class DayController : MonoBehaviour {
|
public class HouseController : MonoBehaviour {
|
||||||
private int dayCount = 0;
|
private int dayCount = 0;
|
||||||
private static UnityEvent newDayEvent;
|
private static UnityEvent newDayEvent;
|
||||||
public static UnityEvent NewDayEvent => newDayEvent;
|
public static UnityEvent NewDayEvent => newDayEvent;
|
||||||
|
|
||||||
|
public Canvas menu;
|
||||||
|
|
||||||
private void OnMouseDown() {
|
private void OnMouseDown() {
|
||||||
newDay();
|
toggleMenu();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Start() {
|
void Start() {
|
||||||
newDayEvent ??= new UnityEvent();
|
newDayEvent ??= new UnityEvent();
|
||||||
|
|
||||||
newDayEvent.AddListener(newDay);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void newDay() {
|
public void newDay() {
|
||||||
dayCount++;
|
dayCount++;
|
||||||
|
Debug.Log("New day: " + dayCount);
|
||||||
newDayEvent?.Invoke();
|
newDayEvent?.Invoke();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void toggleMenu() {
|
||||||
|
menu.gameObject.SetActive(!menu.gameObject.activeSelf);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -14,16 +14,20 @@ public class TileBehaviour : MonoBehaviour
|
||||||
{
|
{
|
||||||
Debug.Log("Created");
|
Debug.Log("Created");
|
||||||
SetTile(new GrassTile());
|
SetTile(new GrassTile());
|
||||||
|
|
||||||
|
HouseController.NewDayEvent.AddListener(tile.DayLightStep);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update is called once per frame
|
// Update is called once per frame
|
||||||
void Update()
|
void Update()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void OnMouseDown()
|
void OnMouseDown()
|
||||||
{
|
{
|
||||||
Debug.Log("Clicked");
|
Debug.Log("Clicked");
|
||||||
|
|
||||||
UsableItem usable = PlayerController.instance.GetSelectedItem();
|
UsableItem usable = PlayerController.instance.GetSelectedItem();
|
||||||
BaseTile tileToSetTo = null;
|
BaseTile tileToSetTo = null;
|
||||||
if (usable.GetType() == typeof(TerraformingTool))
|
if (usable.GetType() == typeof(TerraformingTool))
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ namespace Tiles
|
||||||
|
|
||||||
public void DayLightStep()
|
public void DayLightStep()
|
||||||
{
|
{
|
||||||
|
Debug.Log("I evolve");
|
||||||
}
|
}
|
||||||
|
|
||||||
public BaseTile Clicked(UsableItem usable)
|
public BaseTile Clicked(UsableItem usable)
|
||||||
|
|
|
||||||
|
|
@ -41,3 +41,9 @@ TagManager:
|
||||||
- name: Default
|
- name: Default
|
||||||
uniqueID: 0
|
uniqueID: 0
|
||||||
locked: 0
|
locked: 0
|
||||||
|
- name: Background
|
||||||
|
uniqueID: 2278647887
|
||||||
|
locked: 0
|
||||||
|
- name: Object
|
||||||
|
uniqueID: 4016608247
|
||||||
|
locked: 0
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue