So I have this simple question:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Tilemaps;
public class Break : MonoBehaviour
{
public Grid gridd;
public Tilemap tp;
Dictionary<Vector3Int, int> clickedTile = new Dictionary<Vector3Int, int>();
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
Vector3Int currentCell = gridd.WorldToCell(transform.position);
if(Input.GetMouseButtonDown(1))
{
if(tp.HasTile(currentCell))
{
Debug.Log(currentCell);
clickedTile.Add(currentCell, 1);
if (clickedTile.ContainsValue(1))
{
// This is where I want to add 1 to the integer
}
}
}
}
}
How can I add 1 to the integer?