Unity 温度显示

using System.Collections;

using System.Collections.Generic;

using TMPro;

using UnityEngine;

using UniRx;

public class OutsideTemperature : MonoBehaviour

{

SerializeField

private TextMeshProUGUI _temperature;

复制代码
private static readonly string TAG = "OutsideTemperature";
void Start()
{
    DataCenter.Temperature.Subscribe(i => {
    Log.I(TAG, "Temperature select value:  " + i);
        _temperature.text = Mathf.FloorToInt(i).ToString();
    }).AddTo(this);
}

}

相关推荐
小贺儿开发4 小时前
《长征 · 征途》Unity 三维互动沙盘
科技·3d·unity·1024程序员节·地形·互动·沙盘
解决小子5 小时前
【虚幻引擎】【C++】【GAS框架】构建角色基类、属性集、数值钳制
c++·笔记·游戏引擎·虚幻·gas·能力系统
上班摸鱼下班游戏6 小时前
Unity 仿生智能算法 从蚁群算法 开始
算法·unity·游戏引擎
Oiiouui8 小时前
针对Godot-GridGame(网格游戏)的DI注入+RefCounted数据驱动信号流架构设计的研究(全程开源)
游戏·游戏引擎·godot·1024程序员节
Wanda12149 小时前
机器人与机电一体化3D数字孪生机器-Day6
unity·机器人·数字孪生·1024程序员节
淡海水13 小时前
07-03-源码-.NET Core GC标记与扫描
unity·c#·.netcore·gc
上班摸鱼下班游戏1 天前
从零开始玩转 DOTween
unity·游戏引擎
阿松爱学习1 天前
【Unity开发】Unity长截图功能实现
unity·c#·游戏引擎
小小数媒成员1 天前
Rect Transform
游戏·unity·游戏引擎
淡海水1 天前
07-01-源码-.NET Core GC总览与架构
unity·架构·c#·.netcore·gc