added Tiles, basic TileBehaviour
This commit is contained in:
parent
66756be23b
commit
433158e658
8 changed files with 100 additions and 7 deletions
42
Assets/Scripts/Tiles/BaseTile.cs
Normal file
42
Assets/Scripts/Tiles/BaseTile.cs
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
|
||||
namespace Tiles
|
||||
{
|
||||
public abstract class BaseTile
|
||||
{
|
||||
protected Color color;
|
||||
public Color getColor => color;
|
||||
// Later to be replaced with
|
||||
// public Sprite sprite;
|
||||
|
||||
protected BaseTile(Color color)
|
||||
{
|
||||
this.color = color;
|
||||
}
|
||||
|
||||
protected void Start()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected void Update()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void DayLightStep()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void Clicked(UsableItem usable)
|
||||
{
|
||||
Debug.Log(usable.ToString() + " used on " + this.ToString());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
12
Assets/Scripts/Tiles/FarmlandTile.cs
Normal file
12
Assets/Scripts/Tiles/FarmlandTile.cs
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
using UnityEngine;
|
||||
|
||||
namespace Tiles
|
||||
{
|
||||
public class FarmlandTile : BaseTile
|
||||
{
|
||||
public FarmlandTile() : base(Color.black)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
12
Assets/Scripts/Tiles/GrassTile.cs
Normal file
12
Assets/Scripts/Tiles/GrassTile.cs
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
using UnityEngine;
|
||||
|
||||
namespace Tiles
|
||||
{
|
||||
public class GrassTile : BaseTile
|
||||
{
|
||||
public GrassTile() : base(Color.green)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
12
Assets/Scripts/Tiles/WaterTile.cs
Normal file
12
Assets/Scripts/Tiles/WaterTile.cs
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
using UnityEngine;
|
||||
|
||||
namespace Tiles
|
||||
{
|
||||
public class WaterTile : BaseTile
|
||||
{
|
||||
public WaterTile() : base(Color.blue)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue