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
|
|
@ -51,12 +51,10 @@ public class Crop {
|
|||
}
|
||||
|
||||
public void DayLightStep() {
|
||||
Debug.Log("Crop.DayLightStep");
|
||||
ApplyAction(NextDay);
|
||||
}
|
||||
|
||||
public void Clicked(UsableItem usableItem) {
|
||||
Debug.Log("Crop.Clicked UsableItem " + usableItem);
|
||||
if(usableItem != null) {
|
||||
ItemContainer ic = ItemContainer.Instance;
|
||||
if(ic.GetItemIdByName("Hoe") == usableItem.Id) {
|
||||
|
|
@ -72,7 +70,6 @@ public class Crop {
|
|||
}
|
||||
|
||||
private void ApplyAction(CropAction action) {
|
||||
Debug.Log("ApplyAction: CropAction " + action);
|
||||
if(_planted) {
|
||||
if(Hoe == action) {
|
||||
_planted = false;
|
||||
|
|
@ -116,7 +113,6 @@ public class Crop {
|
|||
}
|
||||
|
||||
private void UpdateSprite() {
|
||||
Dump();
|
||||
if(_planted) {
|
||||
if(_fullyGrown) {
|
||||
//Debug.Log("sprite fg");
|
||||
|
|
|
|||
|
|
@ -8,6 +8,8 @@ public class TileController : MonoBehaviour {
|
|||
|
||||
public GameObject cameraGameObject;
|
||||
|
||||
public List<GameObject> Tiles;
|
||||
|
||||
// Start is called before the first frame update
|
||||
void Start() {
|
||||
Camera camera = cameraGameObject.GetComponent<Camera>();
|
||||
|
|
@ -17,7 +19,7 @@ public class TileController : MonoBehaviour {
|
|||
for(int xx = -x; xx <= x; xx++) {
|
||||
for(int yy = -y; yy <= y; yy++) {
|
||||
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)
|
||||
{
|
||||
BaseTile rv = null;
|
||||
base.Clicked(usable);
|
||||
_crop.Clicked(usable);
|
||||
|
||||
if (ItemContainer.Instance.GetItemIdByName("Shovel") == usable.Id)
|
||||
{
|
||||
rv = new GrassTile(_gameObject);
|
||||
}
|
||||
|
||||
return null;
|
||||
return rv;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -3,7 +3,7 @@ using UnityEngine;
|
|||
|
||||
namespace Tiles {
|
||||
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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue