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

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