Gate and Tower should be able to be place in place of walls
Closed this issue · 1 comments
jellewie commented
When a Stone||Wooden Gate||Tower is placed a wall should not be seen as an obstruction.
The wall (or spiked wall) should be removed upon placement of a gate.
This would make the user able to place a wall, and then place gates and tower over the wall
jellewie commented
if (this.gameObject.GetComponent<BuildingOption>().BuildingName == "Stone_Gate") //If this is a stone gate
{
for (int i = 0; i < Hits.Length; i++) //For each item hit
{
string Name = Hits[i].GetComponent<BuildingOption>().BuildingName; //Get there building name
if (Name == "Stone_Wall" || Name == "Stone_Wall_Spiked" || Name == "Wooden_Wall" || Name == "Wooden_Wall_Spiked")
ObjectsHitAmount--; //Remove one from the Amount ObjectsHit list (This entry should be ignored)
}
}
Debug.Log(ObjectsHitAmount);
return ObjectsHitAmount > 0; //Return true if there's at least 1 collider.