I don’t think we have a terribly special regional greeting here. Most people just say hello. I tried to give my code some character by making it Halloween/Horror themed.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class NumberWizard : MonoBehaviour
{
int max = 1000;
int min = 1;
int guess = 500;
// Start is called before the first frame update
void Start()
{
Debug.Log("Hello, Mortal. Welcome to Hell. I'm the Number Guessing Demon.");
Debug.Log("Do you want to play a game? Never mind. Doesn't matter what you want. You're playing. Choose a number.");
Debug.Log("NO! Don't tell me it, you idiot. I'm the Number GUESSING Demon. The guessing's important. Can't skip that part.");
Debug.Log("Choose another number THAT YOU KEEP SECRET. It can't be hiigher than: " + max + "or lower than " + min);
Debug.Log("Is your number higher or lower than " + guess);
Debug.Log("Push Up = Higher, Push Down = Lower, Push Enter = Corect");
max = max + 1;
}
// Update is called once per frame
void Update()
{
if (Input.GetKeyDown(KeyCode.UpArrow))
{
Debug.Log("Fascinating. I'll guess a higher number. Just going to scan your thoughts again. Hold still. This won't hurt....... Much.");
min = guess;
guess = (max + min) / 2;
Debug.Log(guess);
}
else if (Input.GetKeyDown(KeyCode.DownArrow))
{
Debug.Log("Damn. You've chosen a lower number than I expected. Just hang on while I scan your thoughts..... This *is* going to sting a bit.");
max = guess;
Debug.Log(guess);
guess = (max + min) / 2;
}
else if (Input.GetKeyDown(KeyCode.Return))
{
Debug.Log("YES!! I have guessed correctly. You will be flushed down the spiked exit chute of bloody doom into the lake of fire and then cycled bakc here to play again. Have a nice day!");
}
}
}