예제 #1
0
    protected override void OnViewUpdate()
    {
        base.OnViewUpdate();

        if (IsInvalid(InvalidationFlag.DYNAMIC_DATA))
        {
            if (_icon != null)
            {
                _icon.color = PlayerUtil.GetColor(piece.ownerIndex);
            }

            transform.localPosition = BoardPositionUtil.GetViewPosition(boardPosition);
            // DebugInfo
            _positionType = boardPosition.type;
            _trackIndex   = boardPosition.trackIndex;
            _ownerIndex   = piece.ownerIndex;
        }
    }