Exemple #1
0
    public override void EnterState(CardHandController cardHand)
    {
        Debug.Log("Card Selected State entered");

        cardHand.selectButton.image.color = Color.green;
        cardHand.idleButton.image.color   = Color.white;
        cardHand.dropButton.image.color   = Color.white;
        cardHand.TransitionToState(cardHand.cardDragged);
    }
 public override void Update(CardHandController cardHand)
 {
     if (destination != cardHand.CardBeingDragged.transform.position && destination != null)
     {
         // Move towards the destination each frame until the object reaches it
         IncrementPosition(cardHand);
     }
     else
     {
         cardHand.TransitionToState(cardHand.cardNotSelected);
     }
 }
 public override void OnMouseUp(CardHandController cardHand)
 {
     cardHand.TransitionToState(cardHand.cardReleased);
 }
Exemple #4
0
 private void OnMouseDown()
 {
     chc.CardBeingDragged = this.gameObject;
     chc.TransitionToState(chc.cardSelected);
 }