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_HandleRect: {fileID: 2006577138}
|
||||
m_Direction: 2
|
||||
m_Value: 0.9999999
|
||||
m_Size: 0.53866136
|
||||
m_Value: 1
|
||||
m_Size: 0.5386614
|
||||
m_NumberOfSteps: 0
|
||||
m_OnValueChanged:
|
||||
m_PersistentCalls:
|
||||
|
|
@ -5259,6 +5259,7 @@ MonoBehaviour:
|
|||
m_EditorClassIdentifier:
|
||||
tile: {fileID: 4752245148499717901, guid: ea81011a3ce83fb4386934728a92ee2d, type: 3}
|
||||
cameraGameObject: {fileID: 598358736}
|
||||
Tiles: []
|
||||
--- !u!4 &1291863651
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
@ -7287,7 +7288,9 @@ MonoBehaviour:
|
|||
m_Script: {fileID: 11500000, guid: a6462fee9117d354abebcd1ff897b920, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
startItems: []
|
||||
startItems:
|
||||
- {fileID: 11400000, guid: 008a8fdd2c3a95745acafee4087a855d, type: 2}
|
||||
- {fileID: 11400000, guid: 6bac44b5c4527b641a3ae772d217ec43, type: 2}
|
||||
--- !u!114 &1800469992
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
|
|||
|
|
@ -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