Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

KINGS - Card Swiping Decision Game Asset

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

  1. tieum67

    tieum67

    Joined:
    Mar 7, 2017
    Posts:
    12
    thanks it works perfectly ! Indeed, everything was explained in the manual... I guess i got confused wtih " sending message" and "calling function". Have a nice day !
     
  2. Yunnythee

    Yunnythee

    Joined:
    Oct 2, 2019
    Posts:
    2
    Hi, is there a way to simplify the game so that there are no stats and the cards are played out like a visual novel?
    e.g. there are two options on card A, option 1 leads to card B, option 2 leads to card C...

    just a simple interface without highscore, achievements, quests, and characters, but leave the settings there.
     
    Last edited: Oct 2, 2019
  3. KMDeclius

    KMDeclius

    Joined:
    Aug 12, 2019
    Posts:
    20
    Hello Yunythee,
    welcome to the forum.

    If you want the cards to be played in a specific order, depending on the previous choice, please look at the parameter "Follow Up Card". Each card has an EventScript attached where following cards can be defined, depening on answers, conditions or randomly from a defined pool.

    Following example is configured to draw "Religion_holywar" next, if the user swipes left. If the user swipes right "People_army" or "Religion_cathedral" will be the next card.
    FollowUp.PNG

    Please remember to add your following cards to the card stack and remove the check "Is Drawable", this will prevent them from beeing drawn randomly (I think it is also covered in the documentation).

    Regarding the simplification of the rest:
    I suggest to just move the according UI Canvas or Gameobjects out of the screen manually.
    Why am I so lazy ;) ?
    If you don't need the addional elements but want to add one or another later, it would be a relatively large effort to insert the elements again afterwards.
    Another reason, to be honest, atm I don't know what can be deleted without any problems (also for hidden bugs). :oops:

    Another suggestion: If you want to start with a simpler card (no selection, just one of your cards) please change the parameter "Spawned Card" of the card stack should do the trick. See documentation page 9.

    At least for the follow up, hopefully I could help you.
    Please post if you have more questions or need further advice for the current issue.
     
  4. Yunnythee

    Yunnythee

    Joined:
    Oct 2, 2019
    Posts:
    2
    Thanks a lot! I deleted all values and game canvas except for cards. At first adding cards to gamecanvas didn't work out because they can't be swiped but it's fixed by adding the cards to 'follow up card". I think I can work from this.
     
    Last edited: Oct 3, 2019
  5. tieum67

    tieum67

    Joined:
    Mar 7, 2017
    Posts:
    12
    ingame.PNG actual.PNG result.PNG

    Hello,

    On the right, the result i would like to get
    On the left, the ingame picture
    In the middle , the in editor picture

    As you see, i m struggling with the order of appareance of the pictures. And i didnt find the trick yet. Could you give me an hint ? Thanks !
     

    Attached Files:

  6. tieum67

    tieum67

    Joined:
    Mar 7, 2017
    Posts:
    12

    So, i found a work around : adding an image in the card object, and using the image component only to control the mask. Is there an another solution ?

    imageformask.PNG fond.PNG
     
  7. KMDeclius

    KMDeclius

    Joined:
    Aug 12, 2019
    Posts:
    20
    Hello tieum67,

    it's not clear to me what layering you want to achieve.
    Do you want a base card with a border where you can underlay different other images and icons?
    In this case I would suggest following order of the elements at the card prefab:

    • CardDesign - For this example this is drawn without an image. Children Objects are:
    1. Icon/Image (e. g. your AÏE Text)
    2. The Card Frame with transparency at the Icon/Image region. This should also be possible by using png files with transparency and setting the property "Texture Type" of the image to "Sprite (2D and UI)".
    3. Text 1
    4. ...

    It's important to know that Unity uses this order from top to buttom as the order it draws the Elements. In your second example the "Cardback" is at the end of the list, therefore it is drawn over your previous images. If it would be activated.

    I hope this helps.
     
  8. tieum67

    tieum67

    Joined:
    Mar 7, 2017
    Posts:
    12
    Hello, yes it s exactely what i wanted to achieve... thanks fot the help !

     
    KMDeclius likes this.
  9. jamopolis

    jamopolis

    Joined:
    Jan 20, 2015
    Posts:
    8
    KMDeclius likes this.
  10. KMDeclius

    KMDeclius

    Joined:
    Aug 12, 2019
    Posts:
    20
    Hi jamopolis,
    thank you. We had fun times playing your game in the beta state.
    We wish you much success with your game and hope for more such awesome usage of the Kings Asset like you did.
    It is hard to implement every possible feature in the asset without making it to overly complicated,
    therefore we are happy how you erniched the asset and adoptet it to your needs.
    Sincerly
     
  11. jamopolis

    jamopolis

    Joined:
    Jan 20, 2015
    Posts:
    8
    Thanks @KMDeclius !
     
  12. sonicatu

    sonicatu

    Joined:
    Oct 7, 2019
    Posts:
    1
    Hello! New guy here.

    I want to modify the game cards as to make them smaller and the questions to be displayed above the card instead of on it. However, whenever I do this, the question does display for the BackCard, but not on the front. Can I make the question text visible?
     

    Attached Files:

  13. jamopolis

    jamopolis

    Joined:
    Jan 20, 2015
    Posts:
    8
    My guess is you have a mask on one of the gameobjects that make up the card which is used for hiding the left and right answers. Try moving the question text gameobject outside of the mask gameobject.
     
  14. KMDeclius

    KMDeclius

    Joined:
    Aug 12, 2019
    Posts:
    20
    Hi,
    like jampolis said, it would be the best to move the text GameObject outside of the (animated part) of the card.
    If you don't know how to move the text,
    simply use the template card "NoMovingTextCard". It shows an example where the card is smaller and all texts are outside of the moving object by default. The image is still moving.
    noMovingText.PNG
    If you want your title text to move with the card, simply move the GameObject 'TitleText' from the parent 'CardText' to the parent 'CardImage'. You get this view, if you double-click on the prefab.

    I hope this helps.