using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class battleshipsParentScript : MonoBehaviour
{
public GameObject Ship;
public GameObject Peg;
public bool selctedShip;
public bool selctedPeg;
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void OnMouseClick()
{
if (selctedShip == false)
{
Ship =
selctedShip1();
}
}
void selctedShip1()
{
if (selctedShip == false)
{
selctedShip = true;
}
else
{
selctedShip = false;
}
}
}
What does the ship have to equal so that when the mouse clicks on a ship,in game, that ship is assigned to the game object script? and the same for the pegs?