Posts

Showing posts from October, 2022

Class 5 AR---A puppy cleans the virus

Help a puppy clean the virus in the box...

Class 3 & 4: Looking for hidden cat

  1 Setting: A Garden Character A: Kiyoumi Character B: Justice (hidden in a box)

QUESTION: my function does not appear in OnClick---The code I've got is not working in Unity. The function does not show up in the dropdown Menu in OnClick.

using System . Collections ; using System . Collections . Generic ; using UnityEngine ; public class LearningScripts : MonoBehaviour { public int myFirstInteger ; public bool myFirstBool ; public bool mySecondBool ; public bool myIntegerIsGreaterThanFive ; // Start is called before the first frame update void Start () { } // Update is called once per frame void Update () { if ( Input . GetKeyDown ( "z" )) { ResetIntegerToZero (); } if ( Input . GetKeyDown ( "t" )) { SetIntegerToTen (); } } public void ResetIntergerToZero () { myFirstInteger = 0 ; } public void SetIntegerToTen () { myFirstInteger = 10 ; } }