Picture on my Text 101 Screen

I make some extra feature on my Text101 Game. Added a picture to my States.

  1. Added a New UI/Image to my Canvas
  2. Added a new SerializeField to my state.cs : [SerializeField] Sprite hangulatKep;
  3. Added a new method to my state.cs:
    public Sprite GetHangulatKep()
    return hangulatKep;
  4. Added a New SerializeField to my AdventureGame.cs: [SerializeField] State kezdoState;
  5. Added a new variable to my void start(): Kep.sprite = state.GetHangulatKep();
  6. And in Managestate method: Kep.sprite = state.GetHangulatKep();

It was easy after the lessons! i used this: https://docs.unity3d.com/2018.1/Documentation/ScriptReference/UI.Image-sprite.html

Privacy & Terms