charPos=GameObject.FindGameObjectWithTag("Player").transform.position;// detects the character's position.
// for each number pressed, a new position will be specified by changing the values of the character's (x,z) position to add the marking object
if(Input.GetKeyDown("[1]"))
if(Input.GetKeyDown("[1]"))
{
{
...
@@ -121,7 +123,7 @@ public class markMineEasy : MonoBehaviour
...
@@ -121,7 +123,7 @@ public class markMineEasy : MonoBehaviour
}
}
if(Input.GetMouseButtonDown(0))
if(Input.GetMouseButtonDown(0))// the code for unmarking. it detects the position of the mouse and delete the object there only if it was a marking object