Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using CodeMonkey.Utils;
- public class GridTest : MonoBehaviour
- {
- private Grid grid;
- [SerializeField] private HeatMapVisual heatMapVisual;
- private void Start()
- {
- grid = new Grid(20,10,10.0f,Vector3.zero);
- heatMapVisual.SetGrid(grid);
- }
- private void Update()
- {
- if (Input.GetMouseButtonDown(0))
- {
- Vector3 position = UtilsClass.GetMouseWorldPosition();
- int value = grid.GetValue(position);
- grid.SetValue(position, value + 5);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement