Klammer beim merge verlorn
This commit is contained in:
parent
2311f9fdfe
commit
c06d161006
1 changed files with 16 additions and 20 deletions
|
|
@ -1,35 +1,31 @@
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace Tiles
|
namespace Tiles {
|
||||||
{
|
public class FarmlandTile : BaseTile {
|
||||||
public class FarmlandTile : BaseTile
|
|
||||||
{
|
|
||||||
private Crop _crop;
|
private Crop _crop;
|
||||||
|
|
||||||
public FarmlandTile(GameObject gameObject) : base("Assets/Farming Asset Pack/Split Assets/farming_tileset_008.png", gameObject)
|
|
||||||
{
|
|
||||||
_crop = new Crop(gameObject.transform.GetChild(1).GetComponent<SpriteRenderer>(),
|
|
||||||
gameObject.transform.GetChild(0).GetComponent<SpriteRenderer>());
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void DayLightStep()
|
public FarmlandTile(GameObject gameObject) : base("Assets/Farming Asset Pack/Split Assets/farming_tileset_008.png",
|
||||||
{
|
gameObject) {
|
||||||
|
_crop = new Crop(gameObject.transform.GetChild(1).GetComponent<SpriteRenderer>(),
|
||||||
|
gameObject.transform.GetChild(0).GetComponent<SpriteRenderer>());
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void DayLightStep() {
|
||||||
_crop.DayLightStep();
|
_crop.DayLightStep();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override BaseTile Clicked(UsableItem usable)
|
public override BaseTile Clicked(UsableItem usable) {
|
||||||
{
|
|
||||||
BaseTile rv = null;
|
BaseTile rv = null;
|
||||||
if (usable != null)
|
if (usable != null) {
|
||||||
{
|
|
||||||
base.Clicked(usable);
|
base.Clicked(usable);
|
||||||
_crop.Clicked(usable);
|
_crop.Clicked(usable);
|
||||||
|
|
||||||
if (ItemContainer.Instance.GetItemIdByName("Shovel") == usable.ID)
|
if (ItemContainer.Instance.GetItemIdByName("Shovel") == usable.ID) {
|
||||||
{
|
rv = new GrassTile(_gameObject);
|
||||||
rv = new GrassTile(_gameObject);
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue