当前位置:网站首页>Ngui, floating blood

Ngui, floating blood

2022-06-11 10:27:00 ying1228475251

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

/*
* File description :
* founder :
* Creation time :
* Modification time :
* edition :1.0
*/

public class Test5 : MonoBehaviour {

    GameObject go;
    HUDText ht;
    void Start () {
        go = GameObject.Find("GameObject");
        ht = go.transform.GetComponent<HUDText>();
    }
    void Update () {
        if (Input.GetMouseButtonDown(0))
        {
            ht.Add(-10, Color.red, 1f);
        }
        if (Input.GetMouseButtonDown(1))
        {
            ht.Add(+10, Color.green, 10f);
        }
    }
}
 

原网站

版权声明
本文为[ying1228475251]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/162/202206111020207248.html