Beispiel #1
0
    void OnMouseDown()
    {
        if (buildManager.GetTurretToBuild() == null)
        {
            return;
        }

        if (turret != null)
        {
            Debug.Log("Can't build there! - TODO Display on Screen");
            return;
        }

        GameObject turretToBuild = buildManager.GetTurretToBuild();

        turret = (GameObject)Instantiate(turretToBuild, transform.position + positionOffset, transform.rotation);
        buildManager.SetTurretToBuild(null);
    }
Beispiel #2
0
 public void PurchaseStandardTurret()
 {
     Debug.Log("Standard turret purchased");
     buildManager.SetTurretToBuild(buildManager.standardTurretPrefab);
 }