|
Post by Thestare on Aug 6, 2018 21:56:59 GMT
Hi I was wondering if there was code for showing the cards that are played by the opponent...I noticed that u kind of have to guess what they played...not sure if there is a good way or already a way to show the card before its actually played for a couple seconds or something?
|
|
|
Post by Arghonaut on Aug 7, 2018 8:22:52 GMT
This was one of the first things i did. The AI plays all its cards and does all its attacks instantly, then immediately ends it turns. You can slow it down using the viewer system and IEnumerators and yielding as appropriate. For example, adding in an animation in SummonMinion such as:
minionView.transform.localScale = new Vector3(2f, 1f, 2f); var tweener = minionView.transform.ScaleTo(new Vector3(1f, 0f, 1f), 1f, EasingEquations.EaseInBack); while (tweener != null) yield return null;
Means there is a one second animation for every summon. If set up and do similar for playing cards, attacks etc, it slows down the AI's actions so you can actually see what is going on. Can also use the viewer to have it display the card to the player before it is played, look at the similar code in the clicktoplaycardcontroller.
|
|
|
Post by Legend on Aug 8, 2018 19:54:46 GMT
Hey correcto - i did the Minionview and its similiar but i have animation clips playing instead - i am guessing for the card opponent one so you can see their card that they play- you would have to get the actual on validate play card event or whatever actually confirms the card is played ( just for future 'REMOTE' player mode use) and make some sort of view for it so that the card comes to the front of the screen then fades away. I dont think there is a view already available to use for this - correct?
so i would do something like an OpponentPlayedCardView
where it does something similiar to the drawcards enumerator
|
|
|
Post by Admin on Aug 9, 2018 13:12:42 GMT
The opponent's cards are built the same way as your own cards, so just like Arghonaut said, you can display the opponent's card to the screen in the same way as we look at our own card before playing it. You don't have to create any new view to support this.
|
|
|
Post by Legend on Aug 10, 2018 6:41:13 GMT
ah yes - look in handview - should be pretty easy - i see it.
|
|