1091203 Unity的語法介紹
by 黃國哲
2020-12-03 16:24:05, 回應(0), 人氣(611)


/////以下表示「要使用到的功能」
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
/////以下表示建立了一個類別,叫做「總類別」,總類別之下會有一組{}表示類別的內容
public class 總類別 : MonoBehaviour <---紅色為動作模式,有很多種
{
// Start is called before the first frame update
public Text Keyme ;
public Text tip ; <-------藍色為子類別,這裡有五個子類別
public Text tip2 ;
void Start(){}
// Update is called once per frame
void Update()
{
if (Keyme.text == "abc1")
tip.text= " Data ";
{
tip2.text=" No Data ";
}
}
}
回應