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

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