Синтаксис:
Используется csharp
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class ScoreManager : MonoBehaviour
{
public int score;
public Text scoreDisplay;
public Camera Cam;
public float speed;
private void Update()
{
scoreDisplay.text = score.ToString();
if (score == 10 || score == 11)
{
Cam.transform.position += new Vector3(3f * Time.deltaTime, 0f, 0f);
}
}
}
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class ScoreManager : MonoBehaviour
{
public int score;
public Text scoreDisplay;
public Camera Cam;
public float speed;
private void Update()
{
scoreDisplay.text = score.ToString();
if (score == 10 || score == 11)
{
Cam.transform.position += new Vector3(3f * Time.deltaTime, 0f, 0f);
}
}
}