Beispiel #1
0
 public void ChangeState(EGridNodeState state)
 {
     if (state != currentState)
     {
         currentState = state;
         onStateChanged(currentState);
     }
 }
Beispiel #2
0
        void OnNodeStateChanged(EGridNodeState obj)
        {
            switch (obj)
            {
            case EGridNodeState.Revealed:
            {
                ChangeMaterialToRevealed();
                break;
            }

            default:
                _renderer.sharedMaterial = settings.closedMaterial;
                break;
            }
        }
Beispiel #3
0
 public GridNode(GridPosition position)
 {
     this.position     = position;
     this.currentState = EGridNodeState.Closed;
     this.containsBomb = false;
 }