Home > Software design >  Unity Card Hover Animations
Unity Card Hover Animations

Time:02-15

Hello everyone I am trying to make a hover animation to my cards. When you hover over cards in your hand I want them to go up but the card is a prefab so when I hover over one (or click on one) they all go up at the same time. This is a small project for me to practice Trading Card Games and here is the animationless link: https://play.unity.com/mg/other/unitycardtaskbuild

If you have time it would be really nice if you connect with me through discord.

CodePudding user response:

 public class MyClass: MonoBehaviour, IPointerEnterHandler,IPointerExitHandler
 {
     public void OnPointerEnter(PointerEventData eventData)
     {
         //Move your card up
     }
     public void OnPointerExit(PointerEventData eventData)
     {
         //Move your card down
     }
 }

Try this Out! I've already written it for you! By the way, I played your card game and it's cool! (´∇`)

  • Related