Skip to content

Commit a8989f8

Browse files
author
RUBIUS\chebanovdd
committed
Refactoring.
1 parent a5e9f80 commit a8989f8

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

samples/Unity.Match3/Assets/Scripts/Common/GridTiles/States/IceState.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,22 @@ namespace Common.GridTiles.States
55
public class IceState : StatefulGridTile
66
{
77
private bool _isLocked = true;
8-
private TileGroup _group = TileGroup.Ice;
8+
private int _group = (int) TileGroup.Ice;
99

10-
public override int GroupId => (int) _group;
10+
public override int GroupId => _group;
1111
public override bool IsLocked => _isLocked;
1212
public override bool CanContainItem => true;
1313

1414
protected override void OnComplete()
1515
{
1616
_isLocked = false;
17-
_group = TileGroup.Available;
17+
_group = (int) TileGroup.Available;
1818
}
1919

2020
protected override void OnReset()
2121
{
2222
_isLocked = true;
23-
_group = TileGroup.Ice;
23+
_group = (int) TileGroup.Ice;
2424
}
2525
}
2626
}

samples/Unity.Match3/Assets/Scripts/Common/GridTiles/States/StoneState.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,24 @@ public class StoneState : StatefulGridTile
66
{
77
private bool _isLocked = true;
88
private bool _canContainItem;
9-
private TileGroup _group = TileGroup.Stone;
9+
private int _group = (int) TileGroup.Stone;
1010

11-
public override int GroupId => (int) _group;
11+
public override int GroupId => _group;
1212
public override bool IsLocked => _isLocked;
1313
public override bool CanContainItem => _canContainItem;
1414

1515
protected override void OnComplete()
1616
{
1717
_isLocked = false;
1818
_canContainItem = true;
19-
_group = TileGroup.Available;
19+
_group = (int) TileGroup.Available;
2020
}
2121

2222
protected override void OnReset()
2323
{
2424
_isLocked = true;
2525
_canContainItem = false;
26-
_group = TileGroup.Stone;
26+
_group = (int) TileGroup.Stone;
2727
}
2828
}
2929
}

0 commit comments

Comments
 (0)