init
This commit is contained in:
commit
102013b228
1443 changed files with 1065651 additions and 0 deletions
43
Assets/Scripts/Justa/JustaTargetComboObjects.cs
Normal file
43
Assets/Scripts/Justa/JustaTargetComboObjects.cs
Normal file
|
@ -0,0 +1,43 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using TMPro;
|
||||
|
||||
public class JustaTargetComboObjects : MonoBehaviour
|
||||
{
|
||||
public enum KeyType { W, A, S, D};
|
||||
|
||||
public KeyType key;
|
||||
|
||||
[SerializeField] TextMeshPro text;
|
||||
|
||||
public void SetRandomKey()
|
||||
{
|
||||
int num = UnityEngine.Random.Range(0, Enum.GetValues(typeof(KeyType)).Length);
|
||||
switch (num)
|
||||
{
|
||||
case 0:
|
||||
key = KeyType.W;
|
||||
text.text = "W";
|
||||
break;
|
||||
case 1:
|
||||
key = KeyType.A;
|
||||
text.text = "A";
|
||||
break;
|
||||
case 2:
|
||||
key = KeyType.S;
|
||||
text.text = "S";
|
||||
break;
|
||||
case 3:
|
||||
key = KeyType.D;
|
||||
text.text = "D";
|
||||
break;
|
||||
default:
|
||||
key = KeyType.W;
|
||||
text.text = "W";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue