public void ChangeState(EGridNodeState state) { if (state != currentState) { currentState = state; onStateChanged(currentState); } }
void OnNodeStateChanged(EGridNodeState obj) { switch (obj) { case EGridNodeState.Revealed: { ChangeMaterialToRevealed(); break; } default: _renderer.sharedMaterial = settings.closedMaterial; break; } }
public GridNode(GridPosition position) { this.position = position; this.currentState = EGridNodeState.Closed; this.containsBomb = false; }