none
Beginner's 2D game creation: Unity RRS feed

  • Question

  • Hi, I'm trying to create my first game using unity and I'm stuck on some scripts and some programing. I don't have time to read books since they are to big and I'm working and my researches on the internet have led me no where. That's why I've come to ask you people questions.
    • Moved by Fei Hu Wednesday, February 28, 2018 7:26 AM From C# forum
    Tuesday, February 27, 2018 2:47 PM

All replies

  •     public UnityEngine.UI.Text m_LeText;
        public UnityEngine.UI.InputField m_LeResult;


        string LaPhraseAffichee;
        int N1;
        int N2;

        void Start () {
            N1 = Random.Range (1, 10);
            N2 = Random.Range (1, 10);

            LaPhraseAffichee = N1.ToString () + " x " + N2 + " = ";

            m_LeText.text = LaPhraseAffichee;
        }

        public void TestResult (string _LaRemarque) {
            int Result = int.Parse (_LaRemarque);

            if (Result == N1 * N2) {
            LaRemarque Tostring = "Bien Joué!";
                Debug.Log ;
            } else {
            LaRemarque Tostring = "Recommence!";
                Debug.Log ;
            }

        }

        void Update () {
            
        }
    }

    I am trying to make a math multiplication game with a script that says "Bien Joué!" when you've won and "Recommence" when you've lost

    But it seems as if "Le text" and "La phrase affichee" aren't compatible. I'm trying to put it in a text that can change

    Tuesday, February 27, 2018 2:56 PM
  • You need to ask the forums at unity3d.com.  That's not a Microsoft product, so you won't find much help here.

    And, by the way, telling us that you can't be bothered to read about it is not a good way to get help.


    Tim Roberts, Driver MVP Providenza & Boekelheide, Inc.

    Wednesday, February 28, 2018 12:00 AM
  • Hello DynamoVermillion,

    According to your question is more related to third party technology, you could repost a new thread to unity forum for better solution and professional support.

    If you have some grammar or code errors in using C#, please feel free to contact us. We will try our best to give you a solution.

    Best Regards,

    Neil Hu


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, February 28, 2018 7:26 AM
  • I'm a student, and I'm willing to read the books this summer

    Sunday, March 11, 2018 5:29 PM