changed water sprite, removed debug logs, farmland -> grass with shovel
This commit is contained in:
parent
cdd8ae7441
commit
74d6c7813c
6 changed files with 19 additions and 21 deletions
|
|
@ -1670,8 +1670,8 @@ MonoBehaviour:
|
||||||
m_TargetGraphic: {fileID: 2006577139}
|
m_TargetGraphic: {fileID: 2006577139}
|
||||||
m_HandleRect: {fileID: 2006577138}
|
m_HandleRect: {fileID: 2006577138}
|
||||||
m_Direction: 2
|
m_Direction: 2
|
||||||
m_Value: 0.9999999
|
m_Value: 1
|
||||||
m_Size: 0.53866136
|
m_Size: 0.5386614
|
||||||
m_NumberOfSteps: 0
|
m_NumberOfSteps: 0
|
||||||
m_OnValueChanged:
|
m_OnValueChanged:
|
||||||
m_PersistentCalls:
|
m_PersistentCalls:
|
||||||
|
|
@ -5259,6 +5259,7 @@ MonoBehaviour:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
tile: {fileID: 4752245148499717901, guid: ea81011a3ce83fb4386934728a92ee2d, type: 3}
|
tile: {fileID: 4752245148499717901, guid: ea81011a3ce83fb4386934728a92ee2d, type: 3}
|
||||||
cameraGameObject: {fileID: 598358736}
|
cameraGameObject: {fileID: 598358736}
|
||||||
|
Tiles: []
|
||||||
--- !u!4 &1291863651
|
--- !u!4 &1291863651
|
||||||
Transform:
|
Transform:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
@ -7287,7 +7288,9 @@ MonoBehaviour:
|
||||||
m_Script: {fileID: 11500000, guid: a6462fee9117d354abebcd1ff897b920, type: 3}
|
m_Script: {fileID: 11500000, guid: a6462fee9117d354abebcd1ff897b920, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
startItems: []
|
startItems:
|
||||||
|
- {fileID: 11400000, guid: 008a8fdd2c3a95745acafee4087a855d, type: 2}
|
||||||
|
- {fileID: 11400000, guid: 6bac44b5c4527b641a3ae772d217ec43, type: 2}
|
||||||
--- !u!114 &1800469992
|
--- !u!114 &1800469992
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
|
||||||
|
|
@ -51,12 +51,10 @@ public class Crop {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void DayLightStep() {
|
public void DayLightStep() {
|
||||||
Debug.Log("Crop.DayLightStep");
|
|
||||||
ApplyAction(NextDay);
|
ApplyAction(NextDay);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Clicked(UsableItem usableItem) {
|
public void Clicked(UsableItem usableItem) {
|
||||||
Debug.Log("Crop.Clicked UsableItem " + usableItem);
|
|
||||||
if(usableItem != null) {
|
if(usableItem != null) {
|
||||||
ItemContainer ic = ItemContainer.Instance;
|
ItemContainer ic = ItemContainer.Instance;
|
||||||
if(ic.GetItemIdByName("Hoe") == usableItem.Id) {
|
if(ic.GetItemIdByName("Hoe") == usableItem.Id) {
|
||||||
|
|
@ -72,7 +70,6 @@ public class Crop {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ApplyAction(CropAction action) {
|
private void ApplyAction(CropAction action) {
|
||||||
Debug.Log("ApplyAction: CropAction " + action);
|
|
||||||
if(_planted) {
|
if(_planted) {
|
||||||
if(Hoe == action) {
|
if(Hoe == action) {
|
||||||
_planted = false;
|
_planted = false;
|
||||||
|
|
@ -116,7 +113,6 @@ public class Crop {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UpdateSprite() {
|
private void UpdateSprite() {
|
||||||
Dump();
|
|
||||||
if(_planted) {
|
if(_planted) {
|
||||||
if(_fullyGrown) {
|
if(_fullyGrown) {
|
||||||
//Debug.Log("sprite fg");
|
//Debug.Log("sprite fg");
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,8 @@ public class TileController : MonoBehaviour {
|
||||||
|
|
||||||
public GameObject cameraGameObject;
|
public GameObject cameraGameObject;
|
||||||
|
|
||||||
|
public List<GameObject> Tiles;
|
||||||
|
|
||||||
// Start is called before the first frame update
|
// Start is called before the first frame update
|
||||||
void Start() {
|
void Start() {
|
||||||
Camera camera = cameraGameObject.GetComponent<Camera>();
|
Camera camera = cameraGameObject.GetComponent<Camera>();
|
||||||
|
|
@ -17,7 +19,7 @@ public class TileController : MonoBehaviour {
|
||||||
for(int xx = -x; xx <= x; xx++) {
|
for(int xx = -x; xx <= x; xx++) {
|
||||||
for(int yy = -y; yy <= y; yy++) {
|
for(int yy = -y; yy <= y; yy++) {
|
||||||
if(tile != null) {
|
if(tile != null) {
|
||||||
Instantiate(tile, new Vector3(xx, yy, 0), Quaternion.identity);
|
Tiles.Add(Instantiate(tile, new Vector3(xx, yy, 0), Quaternion.identity));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,10 +19,16 @@ namespace Tiles
|
||||||
|
|
||||||
public override BaseTile Clicked(UsableItem usable)
|
public override BaseTile Clicked(UsableItem usable)
|
||||||
{
|
{
|
||||||
|
BaseTile rv = null;
|
||||||
base.Clicked(usable);
|
base.Clicked(usable);
|
||||||
_crop.Clicked(usable);
|
_crop.Clicked(usable);
|
||||||
|
|
||||||
return null;
|
if (ItemContainer.Instance.GetItemIdByName("Shovel") == usable.Id)
|
||||||
|
{
|
||||||
|
rv = new GrassTile(_gameObject);
|
||||||
|
}
|
||||||
|
|
||||||
|
return rv;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -3,7 +3,7 @@ using UnityEngine;
|
||||||
|
|
||||||
namespace Tiles {
|
namespace Tiles {
|
||||||
public class WaterTile : BaseTile {
|
public class WaterTile : BaseTile {
|
||||||
public WaterTile(GameObject gameObject) : base("Assets/Farming Asset Pack/Split Assets/farming_tileset_023.png", gameObject) {
|
public WaterTile(GameObject gameObject) : base("Assets/Farming Asset Pack/Split Assets/water_sprite_00.png", gameObject) {
|
||||||
}
|
}
|
||||||
|
|
||||||
public override BaseTile Clicked(UsableItem usable) {
|
public override BaseTile Clicked(UsableItem usable) {
|
||||||
|
|
|
||||||
|
|
@ -137,21 +137,12 @@
|
||||||
"dependencies": {},
|
"dependencies": {},
|
||||||
"url": "https://packages.unity.com"
|
"url": "https://packages.unity.com"
|
||||||
},
|
},
|
||||||
"com.unity.nuget.newtonsoft-json": {
|
|
||||||
"version": "3.0.2",
|
|
||||||
"depth": 2,
|
|
||||||
"source": "registry",
|
|
||||||
"dependencies": {},
|
|
||||||
"url": "https://packages.unity.com"
|
|
||||||
},
|
|
||||||
"com.unity.services.core": {
|
"com.unity.services.core": {
|
||||||
"version": "1.3.1",
|
"version": "1.0.1",
|
||||||
"depth": 1,
|
"depth": 1,
|
||||||
"source": "registry",
|
"source": "registry",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"com.unity.modules.unitywebrequest": "1.0.0",
|
"com.unity.modules.unitywebrequest": "1.0.0"
|
||||||
"com.unity.nuget.newtonsoft-json": "3.0.2",
|
|
||||||
"com.unity.modules.androidjni": "1.0.0"
|
|
||||||
},
|
},
|
||||||
"url": "https://packages.unity.com"
|
"url": "https://packages.unity.com"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue