コード例 #1
0
ファイル: Grid2D.cs プロジェクト: LywOPUS/AlderaminUtils
 public void SetValue(int x, int y, TGridObject gridObject)
 {
     if (x >= 0 && y >= 0 && x < _width && y < _height)
     {
         _gridArray[x, y] = gridObject;
         OnGridMapValueChangeEvent?.Invoke(this, new GridChangeEventArgs(x, y));
     }
     else
     {
         Debug.Log("out of grid map");
     }
 }
コード例 #2
0
ファイル: Grid2D.cs プロジェクト: LywOPUS/AlderaminUtils
        public void TriggerGridMapValueChangeEvent(int x, int y)
        {
            var arg = new GridChangeEventArgs(x, y);

            OnGridMapValueChangeEvent?.Invoke(this, arg);
        }