예제 #1
0
    void MoveToDiscard(CardProspector cd)
    {
        cd.state = eCardState.discard;
        discardPile.Add(cd);
        cd.transform.parent = layoutAnchor;

        cd.transform.localPosition = new Vector3(
            layout.multiplier.x * layout.discardPile.x,
            layout.multiplier.y * layout.discardPile.y,
            -layout.discardPile.layerID + 0.5f);
        cd.faceUp = true;
        cd.SetSortingLayerNames(layout.discardPile.layerName);
        cd.setSortOrder(-100 + discardPile.Count);
    }
예제 #2
0
    void MoveToTarget(CardProspector cd)
    {
        if (target != null)
        {
            MoveToDiscard(target);
        }
        target                     = cd;
        cd.state                   = eCardState.target;
        cd.transform.parent        = layoutAnchor;
        cd.transform.localPosition = new Vector3(
            layout.multiplier.x * layout.discardPile.x,
            layout.multiplier.y * layout.discardPile.y,
            -layout.discardPile.layerID);

        cd.faceUp = true;
        cd.SetSortingLayerNames(layout.discardPile.layerName);
        cd.setSortOrder(0);
    }