Search Unity

KINGS - Card Swiping Decision Game Asset

Discussion in 'Assets and Asset Store' started by Maulwurfmann, Nov 26, 2017.

  1. Maulwurfmann

    Maulwurfmann

    Joined:
    Mar 11, 2014
    Posts:
    366
    Ever wanted to create your own King/Dictator/Leadership or any other decision based simulation game? Here is the complete kit for this!

    Web-Demo | The Mayor Web-Demo | Android-Demo | Documentation | Getting StartedTutorial | FAQ

    Features:
    • easy to reskin and modify
    • different decision / result types
    • unlimited number of stats/factions
    • complex value system
    • persistent values
    • card import / export feature, to easily edit text in Excel
    • card styles, allows quick editing of the card design
    • Achievements & Highscore System
    • Life summarization (Game Logger)
    • Character Name Generation
    • Decision Results Preview
    • Supports: I2 Localization, Hyper Card, ShaderO, Unity Ads, Google Play Games and iOS Gamecenter*
    • Documentation and commented C# code
    • Full working game example, release-ready without any coding experience
    • Optimized for mobile, but works for all others platforms with mouse/touch input
    • and much more!

    * iOS Gamecenter support requires a separate Plugin


    Asset Store Link: http://u3d.as/11kM
    Contact: support@km-games.com







    1newdesign.png
    2mayor.png
    3screenImEx.png
    4cardStyles.png
    5cardTemplates.png
     
    Last edited: Jun 4, 2019
    lmandelbaum, BBET and Retrotation like this.
  2. Maulwurfmann

    Maulwurfmann

    Joined:
    Mar 11, 2014
    Posts:
    366
    Retrotation likes this.
  3. Maulwurfmann

    Maulwurfmann

    Joined:
    Mar 11, 2014
    Posts:
    366
    We are giving away 3 Voucher codes. The first 3 who post here will receive it. Good luck! ;)
     
    Retrotation likes this.
  4. ThermodynamicsMakesMeHot

    ThermodynamicsMakesMeHot

    Joined:
    Feb 14, 2015
    Posts:
    224
    Congrats on making it on the store. Looks like I may be one of the first to post. I would like to review this. Thanks again for the offer.

    Would you mind sharing how long it was from submission to approval. Just curious as I gather the average wait time right now is approx. 3 weeks.
     
  5. jackmememe

    jackmememe

    Joined:
    Jan 21, 2016
    Posts:
    138
    This look pretty great, i would like a voucher if there is any left, once i try it out, i leave a review on the store.
     
  6. Maulwurfmann

    Maulwurfmann

    Joined:
    Mar 11, 2014
    Posts:
    366
    It took 4 weeks for us.
    Codes sent.
     
    Retrotation likes this.
  7. ThermodynamicsMakesMeHot

    ThermodynamicsMakesMeHot

    Joined:
    Feb 14, 2015
    Posts:
    224
    Considering the time of year and all not bad. Thank you for the info and voucher. I will let you know how it goes.
     
  8. SanchoP

    SanchoP

    Joined:
    Oct 24, 2016
    Posts:
    27
    I would like a voucher if there is one left
     
  9. ThermodynamicsMakesMeHot

    ThermodynamicsMakesMeHot

    Joined:
    Feb 14, 2015
    Posts:
    224
    This is asset is quite impressive for the genre its in. Very well done. My only thoughts are the lack of soundfx options and particlefx along with no ad support. When I mean by SFX and VFX is options already coded in to allow drag and drop of audioclips / fx prefabs. Its so complete otherwise I wonder why ad support was not included.

    Its still pretty good and not a hard effort to code in my own sound calls/fx spawns being a coder but I got the impression a big selling point of this kit was no need to code since you can customize almost everything in the editor. These tweaks would flesh it out more and truly be a complete framework.

    => Updated Edit: At first you think you will need a ReorderableList custom editor but you can duplicate entries.
     
    Last edited: Jan 6, 2018
  10. Maulwurfmann

    Maulwurfmann

    Joined:
    Mar 11, 2014
    Posts:
    366
    Many thanks for the review! :)
    Regarding soundfx and particlefx they can be easily played with the Unity EventSystem. There are events already created for every new card (Card Stack) or every Swipe (Swipe Script) or you can trigger Events for specific cards (with the OnSpawn/OnDespawn Event in the EventScript on every card) and using the integrated "Global Message System" (it is used to communicate with spawned prefabs). There is absolutely no coding needed.

    We will add support for UnityAds with the next update ;)

    Sorry, i do not unterstand what you mean with this?
     
  11. ThermodynamicsMakesMeHot

    ThermodynamicsMakesMeHot

    Joined:
    Feb 14, 2015
    Posts:
    224
    Well at first It looks as though your using lists which you are unable to move around in the inspector without some sort of editor script. Leaves everything locked in place unless you rebuild the list manually. I than see your using arrays which you can duplicate a result beneath the item and change it so you can keep everything together a organized. I really liked that approach since I always see lists used rather than arrays. The more I get into this I really see how it everything is wound together and the different techniques used in the code..

    Question
    To preview the base card I found dropping the prefab into CardCanvas => Cards => allows it to show it with placeholder data but not the actual card data, Is there a better way to preview cards while creating them in editor without playtesting?
     
  12. ThermodynamicsMakesMeHot

    ThermodynamicsMakesMeHot

    Joined:
    Feb 14, 2015
    Posts:
    224
    Question#2
    I am not sure I understand how to implement this. What I am trying to do and what I tried.

    => duplicated the lower taxes prefab
    => changed to raise taxes
    => swipe left (yes) to raise taxes
    Result: play soundFX and spawn some visual FX and of course different FX if its a no. (I can make two prefabs that play a clip and effect on enable so this is all set)

    I added Globalmessagesender script to the card, called the trigger RaiseTaxes and added to the despawn as per the documentation. I have it setactive gameobject for my effects but here's where I get stuck.

    I can't seem to figure out how to create 2 events, 1 for left and one for right. So if the player says yes to the card do this, if the player says no to then do that. I am likely over complicating it here. What step am I missing?
     
  13. Maulwurfmann

    Maulwurfmann

    Joined:
    Mar 11, 2014
    Posts:
    366
    The only option you have here is to write it also in the textfields of the card prefab (titleText,QuestionText, AnswerLeft,AnswerRight) in addition to the EventScript.

    For this scenario there is actually no 100% fitting solution integrated, but there are several solutions how this can be done, simply choose what is best for you:
    1) in "Swipe" script there is a event for left swipe and right swipe, but this one does count for all cards and not one specific one.
    2) depending on what kind of fx you want to play, this can also be useful:" Value Script" in the Hierachy window every Value is listed there and has also an event for "OnIncrease" and "OnDecrease"
    3) you can link in a "follow up card" for each direction, for your example you could create a follow up card "taxes raised" with text "your people are upset because you raised taxes" or something like this and in the OnCard Spawn Event you play the fx/sound.
    4) I will send you later an updated EventScript with UnityEvents for each swipe direction, this is very easy to add.

    Hope this helps! ;)
     
  14. ThermodynamicsMakesMeHot

    ThermodynamicsMakesMeHot

    Joined:
    Feb 14, 2015
    Posts:
    224
    That script totally did the trick. Such a simple add event and made a huge impact. Thank you for such a fast turnaround and solution.
     
  15. Maulwurfmann

    Maulwurfmann

    Joined:
    Mar 11, 2014
    Posts:
    366
    Glad to hear! Did you have time to try out the ads script i sent you?
     
  16. Maulwurfmann

    Maulwurfmann

    Joined:
    Mar 11, 2014
    Posts:
    366
    Update 1.10 with Unity Ads support and some other minor improvements is now submitted to the AssetStore. I have also updated the Android demo in Google Play Store if you want to try it out ;)
     
    Retrotation likes this.
  17. stevenatunity

    stevenatunity

    Joined:
    Apr 17, 2015
    Posts:
    114
    @Maulwurfmann best of luck with Kings. I'll be keeping my eye on this one :)
     
    Maulwurfmann likes this.
  18. ThermodynamicsMakesMeHot

    ThermodynamicsMakesMeHot

    Joined:
    Feb 14, 2015
    Posts:
    224

    Yes I did thank you. It worked great. That you for the modified script and the ad script. Made everything work exactly like I needed it to.
     
  19. Retrotation

    Retrotation

    Joined:
    Jan 10, 2014
    Posts:
    9
    Perfect timing to release it! Thank you for making this :)

    Features that'd be nice:

    #1 Expanded conditional support on Cards. The results can have conditionals on them, but the text fields cannot.

    #2 Multiple conditional Result pathways on the EventScript, rather than just a single true/false or two potential Results.

    #3 Support for multiple Sub-Stack Conditions on the CardStack script!

    #4 Value Changes using other Values, instead of just integers. For example, Religion -= Army

    #5 Value Changes set directly to another Value or Integer. For example, Religion = 20

    #6 Value Changes over time while condition is true. For example, Religion += 1 every second of gameplay, while "Crusades" condition is true (multiple value conditions would be excellent here too) -- ((also would be great with an independent clock, so the clock stops while inside the Menu))

    #7 Values that are not reset upon a new game, or game session. For example, Religion keeps increasing by +1 every second due to the "Crusades" condition, for every game session thereafter, until the player ceases the "Crusades".
     
    Last edited: Jan 12, 2018
  20. Maulwurfmann

    Maulwurfmann

    Joined:
    Mar 11, 2014
    Posts:
    366
    Many thank for your suggestions! :)

    #1 I think this would get a bit too complex if the textfields also get separate conditions, i suggest simply create a different card for it with the fittings conditions

    #2 i think for this case it is best to use the "Follow Up Card" option, this way you can make it as complex as you want

    #3 we will check this, should not be a big problem

    #4 sorry, i don`t unterstand what you mean, please explain a little bit more detailed

    #5 we have already included this in update 1.10, i have attached it, so you don`t have to wait until it`s approved ;)

    #6 honestly i don`t think this is a good idea, we could make something like this per swipe, but time based does not really fit in this kind of game, sorry

    #7 we will have a look at this ;)

    Hope this helps!
     

    Attached Files:

    Retrotation likes this.
  21. Retrotation

    Retrotation

    Joined:
    Jan 10, 2014
    Posts:
    9
    #4 I accomplished it within your system by creating a new class on the EventScript:
    Code (CSharp):
    1.  
    2.     public class resultModifierValue{
    3.         public valueDefinitions.values modifier;
    4.         public valueDefinitions.values valueMod;
    5.         public bool Subtract_or_Add;
    6.     }
    7.  
    I then plugged it into the ModifierGroup class:
    Code (CSharp):
    1.  
    2.     public class modifierGroup{
    3.  
    4.         public resultModifier[] valueChanges;
    5.         public resultModifierValue[] valueChanges_Value;
    6.         public GameObject followUpCard;
    7.     }
    8.  
    and then made another loop in the executeValueChanges() function:

    Code (CSharp):
    1.  
    2. ValueScript valueScript;
    3.         float valueModifier = 0;
    4.         foreach (resultModifierValue rmv in  modsGroup.valueChanges_Value) {
    5.             valueScript = valueManager.instance.getFirstFittingValue(rmv.valueMod);
    6.             valueModifier = valueScript.value;
    7.             valueManager.instance.changeValue (rmv.modifier, rmv.Subtract_or_Add?valueModifier:-valueModifier);
    8.         }
    9.  

    =========================



    #6 the time-based mechanic is fundamental to Reigns, from what I've played. Have you ever gotten the Silk-Road card or Crusades, which are some of the first timer-based cards you unlock?

    It definitely fits!! But I suppose I will make this myself, the feature is simple enough to integrate.


    BTW Thank you for the upload and swift reply!

    Something else I intend to implement, are a third choice to cards (swipe up, like the latest Tinder features now include). Sometimes two choices aren't enough when you want to expand beyond what Reigns offered :)
     
    Last edited: Jan 12, 2018
  22. Retrotation

    Retrotation

    Joined:
    Jan 10, 2014
    Posts:
    9
    I created a new script called "TextFields_Conditional"

    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4.  
    5. public class TextFields_Conditional : MonoBehaviour {
    6.  
    7.     public EventScript.eventTexts_Conditional textToChange;
    8.      
    9.     public void setText(){
    10.         EventScript eventScript = GetComponent<EventScript>();
    11.      
    12.         if ( eventScript.AreConditinsForResultMet(textToChange.titleText.conditions) ){
    13.             eventScript.textFields.titleText.textContent = textToChange.titleText.modifiersTrue.textContent;
    14.         }
    15.      
    16.         if ( eventScript.AreConditinsForResultMet(textToChange.questionText.conditions) ){
    17.             eventScript.textFields.questionText.textContent = textToChange.questionText.modifiersTrue.textContent;
    18.         }
    19.      
    20.         if ( eventScript.AreConditinsForResultMet(textToChange.answerLeft.conditions) ){
    21.             eventScript.textFields.answerLeft.textContent = textToChange.answerLeft.modifiersTrue.textContent;
    22.         }
    23.      
    24.         if ( eventScript.AreConditinsForResultMet(textToChange.answerRight.conditions) ){
    25.             eventScript.textFields.answerRight.textContent = textToChange.answerRight.modifiersTrue.textContent;
    26.         }
    27.     }
    28. }
    29.  
    and then added some new classes to the EventScript:

    Code (CSharp):
    1.  
    2.     public class eventText_Conditional
    3.     {
    4.         public condition[] conditions;
    5.         [Tooltip("Group of value changes, if all conditions are met.")]
    6.         public eventText    modifiersTrue;
    7.     }
    8.  
    9.     public class eventTexts_Conditional{
    10.         public eventText_Conditional titleText;
    11.         public eventText_Conditional questionText;
    12.         public eventText_Conditional answerLeft;
    13.         public eventText_Conditional answerRight;
    14.     }

    BUT!!! To make it all work, I needed to move the writeTextFields() function-call from the Awake(), over to the Start(), like so:

    Code (CSharp):
    1.     void Start () {
    2.         OnCardSpawn.Invoke ();
    3.         writeTextFields ();
    4.     }
    Is there a particular reason that the writeTextFields() is called from Awake(), rather than Start()?

    Should I be concerned about re-ordering the Start and Awake of the EventScript?
     
  23. Maulwurfmann

    Maulwurfmann

    Joined:
    Mar 11, 2014
    Posts:
    366

    There is no particular reason for setting it into Awake(). For 'writeTextFields()' there should be no problem, but you should be aware where you call your function 'setText()'. If you call it from another Start(), depending on the execution order of the scripts, it is possible the texts do not actualize. If you call your 'setText()' from an Awake() and calling 'writeTextFields()' in Start() the should be ok.

    Another option is to make ' writeTextFields()' in the EventScript public, call your function 'setText()' at some time and then call 'writeTextFields()' to actualize it. (Not tested yet)

    Regarding your value change over time and your other requests I will have look at it tomorrow and will see what I can do ;)
     
    Retrotation likes this.
  24. Retrotation

    Retrotation

    Joined:
    Jan 10, 2014
    Posts:
    9
    Thank you for your support! I really love the fact you folks put this out here, as it is worth every penny to me :) PS: I just start the setText() function on the OnCardSpawn() UnityEvent.

    If anyone else is looking for the small features I requested earlier, here is another temporary solution:

    For multiple Sub-Stack Conditions on the Card Stack script:


    We first need to make the condition type into an Array, inside the cardCategory class:
    Code (CSharp):
    1. public class cardCategory
    2.     {
    3.         public string groupName;
    4.         public EventScript.condition[] subStackCondition;
    5.         public GameObject[] groupCards;
    6.     }
    Next, have to make sure that it checks all the conditions when sorting for all possibly cards:
    Code (CSharp):
    1.  
    2. void sortForPossibleCards(){
    3.  
    4.         ...
    5.  
    6.         for (int i = 0; i<allCards.Length; i++) {
    7.             if (valueManager.instance.AreConditinsForResultMet (allCards[i].subStackCondition ) ) { ...
    8.  
    However, we need to move the AreConditinsForResultMet() function from the EventScript, over to the valueManager, so our CardStack script can access it as a static function. The above code will not work until you do so.
     
    Last edited: Jan 12, 2018
    Maulwurfmann likes this.
  25. Maulwurfmann

    Maulwurfmann

    Joined:
    Mar 11, 2014
    Posts:
    366
    Many thanks for your input! I can`t write you a private message, so please contact me, so i can send you an link to the latest version with the following requested features:
    - persistent values (checkbox on valuescript)
    - add values with values (example in ValueChangesValue_card)
    - value dependent timer with value change (example: married value)
    - condition list for substack
    - more result for eventcards (two are configured, example: multichoice_card)
    it is currently solved, but with some modifactions of the animator you could also do this for up and down swipes

    Regarding Reigns, yes this inspired me to make this asset, but honestly i didn`t play it, i just watch some gameplay videos, so i don`t know all features ;) But i really liked the idea and wanted to make a live simulation game, where you have to make decisions starting as a baby to a grown adult, but i lost motivation to continue it and so we decided to make at least this asset, so that the work is not completely gone waste ;)
     
    Retrotation likes this.
  26. Retrotation

    Retrotation

    Joined:
    Jan 10, 2014
    Posts:
    9
    Hi, I can't find your email anywhere, or a way to private message you first (twitter doesn't allow that either). My spam-hoarding email is Zephir62@gmail.com, so send me an email there. I'll keep an eye out for you, and we can discuss things further. Love your game idea by the way! I have one of those on the backburner too :) one of my favorite concepts

    I have a question by the way, how do I manually reset my character data? I have modified the game in such a way that I cannot easily die at the moment, is there any easy way to delete my character's data? in essence, is the character data stored in JSON or an XML format somewhere?

    ^^^ Currently I am handling it by removing all card groups so that I get the fallback and lose the game.
     
    Last edited: Jan 14, 2018
  27. Maulwurfmann

    Maulwurfmann

    Joined:
    Mar 11, 2014
    Posts:
    366
    I have sent you an email ;)
    I have aslo added our e-mail to the first post.

    To reset your data, you simple need to call the function "executeGameover" of the GameStateManager.
     
    Last edited: Jan 14, 2018
    Retrotation likes this.
  28. Maulwurfmann

    Maulwurfmann

    Joined:
    Mar 11, 2014
    Posts:
    366
    Update 1.10 with UnityAds support is now available in the Asset Store.

    As soon as i have feedback regarding the latest changes i will finish up Update 1.20 with the above mentioned new features.
     
    Retrotation likes this.
  29. Maulwurfmann

    Maulwurfmann

    Joined:
    Mar 11, 2014
    Posts:
    366
    Update 1.20 is now available in the Asset Store.

    New Features:
    - persistent values
    - add/deduct values with values
    - change values over time
     
  30. ThermodynamicsMakesMeHot

    ThermodynamicsMakesMeHot

    Joined:
    Feb 14, 2015
    Posts:
    224
    I am needing to open up some properties on the EventScript.cs. In short I am switching everything to TextMeshPro. I had to remove the editor script to be able to modify this. Is there something in the editor script to open up access to add in a different text field rather than disable the whole editor script?

    What I did was just remove it and change/add what I needed and moved it back. Seems to work but I think I am at a point any new updates will severely break everything.
     
  31. Maulwurfmann

    Maulwurfmann

    Joined:
    Mar 11, 2014
    Posts:
    366
    You could either modify the editor script to show the data you want, or you can turn on debug view (see screenshot), this way you dont`t have to remove the editor script.
     

    Attached Files:

  32. ThermodynamicsMakesMeHot

    ThermodynamicsMakesMeHot

    Joined:
    Feb 14, 2015
    Posts:
    224
    That will work thank you. I knew there was a simple thing I was overlooking.

    Ran into something else now, converting everything to TextMeshPro. All is working except the AnswerLeft and AnswerRight. I see that there is some animation that brings it into focus but its not working for the TextMeshPro objects, only the regular UGUI text. So I think there is another hidden property somewhere that I need to link this to but I can't seem to find it. Oddly when I swipe it shows the colour change but the text is missing. There is a textcovering object that if I move the text underneath it is visible. I did not see any sprite ordering or anything that might be the reason.

    Thank you
     
  33. Maulwurfmann

    Maulwurfmann

    Joined:
    Mar 11, 2014
    Posts:
    366
    The animation does not affect the Text component itself, only the Rect Transform (to change position/rotation), see Screenshot. I am not sure how you changed it, did you just remove the Text component and added the TextMesh Pro component instead or did you create a new gameobject? If yes, check if it has the same name as the previous one.

    edit: also check if you changed the order in hierarchy window, in this order the objects are arranged by unity (lowest is top).
     

    Attached Files:

  34. ThermodynamicsMakesMeHot

    ThermodynamicsMakesMeHot

    Joined:
    Feb 14, 2015
    Posts:
    224
    I left the old text in and just added a bool for usingtextmeshpro. If it's checked then it disables the UGUI text and enables the textmeshpro objects. I added the textmeshpro to be over top and same size as the UGUI text. It functions normally I believe but I can't see the text, just the colour changing to show the boxes and seeing that screenshot makes me think I did everything right but there must be something with the textmeshpro component since everything else is working fine, I just can't see the text. I will have to fiddle some more with it and see what I can come up with.
     
  35. ThermodynamicsMakesMeHot

    ThermodynamicsMakesMeHot

    Joined:
    Feb 14, 2015
    Posts:
    224
    The rect animation is exactly the issue. Where and how is that being called is the problem.
    It's using the UGUI specifically so new animations have to be made.

    I found it. What I need was the SampleCard animator.

    Anyone else who might run into this here is a quick walkthrough.

    The picture in post
    which shows the animator which is the SampleCard.

    You just need to add TextMeshPro objects into the properties just like the UGUI ones.
    After you create them (I used TextMeshProUGUI) Then you need to go into the animator and add properties to reference the rects of the TextMeshPro objects.
    Copy the values from (AnswerLeft/Right: AnchoredPosition) then the (Rotation) values and place them into the TextMeshPro properties that you added and everything its right. Remember: You have to do this for each animation type.

    So good news for anyone who wonders about TextMeshPro....It's all easy going until this which requires time pain in duplicating the properties in the animations for each swipe type but the end result is worth it as all cards inherit from the main animator file your editing so you only do it once.
     
    Last edited: Feb 15, 2018
    Maulwurfmann likes this.
  36. paramime

    paramime

    Joined:
    Feb 18, 2018
    Posts:
    1
    Hi

    Does this asset have the option to unlock cards by persistent conditions such as completing 1 play through. i.e persistent unlocks.
     
    Maulwurfmann likes this.
  37. Maulwurfmann

    Maulwurfmann

    Joined:
    Mar 11, 2014
    Posts:
    366
    Yes, since the last update 1.20, this is now possible. You have to simply make the spefic value persistent, by checking the option "Keep Value" in the Value Script. And in the Card Stack you have to create a new group with the wanted condition for this value.
     
  38. ThermodynamicsMakesMeHot

    ThermodynamicsMakesMeHot

    Joined:
    Feb 14, 2015
    Posts:
    224
    We have a condition that requires you to have died 3 different ways to unlock a special death. It's safe to say there are many options to have so many different conditions. I can't recommend using a spreadsheet enough. It's a MUST because if you just rely on prefabs you will soon get lost.

    Something I am trying to figure out is the best way to do this is using google sheets instead of having prefabs for the cards so we can have a speadsheet with all the card data to pull from. My main reason for wanting to do this is I can continue to add new stuff without having to reupload a new package to the store. Only downside is internet connection required to get the new sheets as we want to have them store it on the device and only check if needs to update. The huge bonus is the filtering and sorting and having a clear picture of how all the cards interact with each other. Having this on a spreadsheet makes it so much easier.
     
  39. Maulwurfmann

    Maulwurfmann

    Joined:
    Mar 11, 2014
    Posts:
    366
    In the planing phase i also tried it with an excel sheet, but it got way to huge and confusing, because of all the possible conditions and result combinations, so i decided for this solution. I recommend to create folders for each substack categorie and think of a continuously and clear naming for the cards.
     
  40. Maulwurfmann

    Maulwurfmann

    Joined:
    Mar 11, 2014
    Posts:
    366
  41. radagastmag

    radagastmag

    Joined:
    Feb 5, 2016
    Posts:
    13
    Good afternoon. I have 2 questions.
    1. I want to reduce the size of the map, but the animation remains the same. Please tell me how to fit the animation to a small map.
    2. I want to take the text from the card to the interface. In order for the card to move, the question was left on the spot. Is it possible to implement it now?
    I will be grateful for the help!
     
  42. Maulwurfmann

    Maulwurfmann

    Joined:
    Mar 11, 2014
    Posts:
    366
    1. Editing the animations is very easy. There is currently only 1 animator for all cards which uses the same animations for every card. (of course you can use different animators/animations for each card). To edit the position of the card simply edit the specific animation for each position (card_left0,1,2...) see screenshot below.
    animator.png

    2. Currently it is not possible to move the text of the cards to other ui objects. I will have a look if i can find a quick solution for this.

    Hope this helps!
     
  43. radagastmag

    radagastmag

    Joined:
    Feb 5, 2016
    Posts:
    13
    Thank you very much for your help! I managed to customize the animation for a different card size. It looks cool!
    But I can not place the text over the map ((All the texts in the map are tied to Card Сanvas and are animated along with the map.
    I think if you implement a separate Сanvars for the text, this will make the game much better for perception. But I do not know how to do it ((
     

    Attached Files:

  44. Maulwurfmann

    Maulwurfmann

    Joined:
    Mar 11, 2014
    Posts:
    366
    If i understand you correctly you can do it pretty easily by changing the Layout of the card prefabs. please see below screenshot:
    card.png
    You create a new gameobject for the card graphic itself and put it as a separate object into the card prefab.
    Now you only need to edit the animation to only move the graphic, which is now possible because it is separated from the text.

    If anything is unclear please let me know.
     
  45. Dispencer

    Dispencer

    Joined:
    Dec 28, 2017
    Posts:
    5
    Hi, I'm still struggling with the text anchor.
    How to make text separate from anchor card? I want the text (Title Text & Question Text) of each card not following the card when player swipe, as in the picture. Is it possible? Thanks
     

    Attached Files:

    • ask.jpg
      ask.jpg
      File size:
      147.2 KB
      Views:
      1,149
  46. Maulwurfmann

    Maulwurfmann

    Joined:
    Mar 11, 2014
    Posts:
    366
    Please have a look at the 2-3 posts above yours, there has been the same question ;)
    You have to modify the card prefab that the card object and the text objects are separately from each other attached to a main card object and then you simply need to adjust the animations that only the card object is moved when swiped.

    Please let me know if this works for you.
     
  47. Dispencer

    Dispencer

    Joined:
    Dec 28, 2017
    Posts:
    5
    This is the result..


    Another question, can I remove the text from the animator controller or I must re-animation the text anchor position for every animation (card_left0,1,2,...)?
    And how to remove masking between the text and the card?
     
  48. Maulwurfmann

    Maulwurfmann

    Joined:
    Mar 11, 2014
    Posts:
    366
    Yes, simply remove the text from the animation, since you dont want it to move.
    The mask is directly on the main card objects, simply remove it and your text should be displayed.
     

    Attached Files:

    • mask.png
      mask.png
      File size:
      47.2 KB
      Views:
      1,031
  49. Dispencer

    Dispencer

    Joined:
    Dec 28, 2017
    Posts:
    5
    Thank you for your help!
    But still, when I remove the texts from the animation, the texts are still tied with the card panel.
    And when I remove the mask, I forget if all the texts will displayed too (lol). How to display only TitleText & QuestionText, but keep the rest hidden? Since all the texts in the same gameobject.
     

    Attached Files:

    • ask2.jpg
      ask2.jpg
      File size:
      101.9 KB
      Views:
      1,132
  50. Maulwurfmann

    Maulwurfmann

    Joined:
    Mar 11, 2014
    Posts:
    366
    I have created a sample card for you, to solve your problem. Just import this package into your project.
    Let me know if you have any issues.
     

    Attached Files:

    Last edited: May 20, 2018