26 lines
406 B
C#
26 lines
406 B
C#
using System;
|
|
using TMPro;
|
|
using UnityEngine;
|
|
|
|
public class ToyRocketController : MonoBehaviour
|
|
{
|
|
public TextMeshPro rocketMassText;
|
|
public float rocketMass;
|
|
|
|
void Start()
|
|
{
|
|
|
|
}
|
|
|
|
void Update()
|
|
{
|
|
|
|
}
|
|
|
|
public void SetRocketMass(float newMass)
|
|
{
|
|
rocketMass = newMass;
|
|
rocketMassText.text = $"{rocketMass:F2} GR".Replace(",", ".");
|
|
}
|
|
}
|