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;
|
||||
|
||||
namespace Tiles
|
||||
{
|
||||
public class FarmlandTile : BaseTile
|
||||
{
|
||||
namespace Tiles {
|
||||
public class FarmlandTile : BaseTile {
|
||||
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();
|
||||
}
|
||||
|
||||
public override BaseTile Clicked(UsableItem usable)
|
||||
{
|
||||
public override BaseTile Clicked(UsableItem usable) {
|
||||
BaseTile rv = null;
|
||||
if (usable != null)
|
||||
{
|
||||
if (usable != null) {
|
||||
base.Clicked(usable);
|
||||
_crop.Clicked(usable);
|
||||
|
||||
if (ItemContainer.Instance.GetItemIdByName("Shovel") == usable.ID)
|
||||
{
|
||||
rv = new GrassTile(_gameObject);
|
||||
if (ItemContainer.Instance.GetItemIdByName("Shovel") == usable.ID) {
|
||||
rv = new GrassTile(_gameObject);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
return rv;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue