public void Activate() { gameObject.SetActive(true); _activeTurnLength = 0; var localPosition = GetMouseLocalGridPosition(); _cellSelectorRenderer = MUtils.CreateSpriteObject2D(transform, localPosition, cellSelectorObject.visual, Color.white, 10); }
private void ToggleSelectedGridObject() { _selectedObjectIndex = (_selectedObjectIndex + 1) % prepareForBattleObjects.Count; while (prepareForBattleObjects[_selectedObjectIndex].empty) { _selectedObjectIndex = (_selectedObjectIndex + 1) % prepareForBattleObjects.Count; } if (_selectedObjectRenderer != null) { Destroy(_selectedObjectRenderer.gameObject); } _selectedObjectRenderer = MUtils.CreateSpriteObject2D(transform, Vector2.zero, gridObjectData.visual, Color.white, 3); }