using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class RandomNumber : MonoBehaviour
{
private float textimer;
public float time = 3f;
public GameObject govno;
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
for (int i = 0; i > 0; i++) {
textimer += Time.deltaTime;
if (textimer % time==0)
{
Instantiate(govno);
}
}
}
}
The type or namespace name 'Text' could not be found (are you missing a using directive or an assembly reference?)
using UnityEngine;
using System.Collections;
using UnityEngine.SceneManagement;
public class Destroy : MonoBehaviour
{
public GameObject explosion; //игровой объект для взрыва астеройда
public GameObject playerExplosion; //игровой объект для взрыва корабля игрока
public GameObject Fdf;
public GameObject Puc;
public GameObject kuritsa;
public GameObject gi;
void Start()
{
Fdf.SetActive(false);
Puc.SetActive(false);
kuritsa.SetActive(false);
gi.GetComponent<Text>().enable = false;
}
void OnTriggerEnter(Collider other)
{
if (other.tag == "Player")
{
}
Fdf.SetActive(true);
Puc.SetActive(true);
kuritsa.SetActive(true);
gi.SetActive(true);
Destroy(gameObject);
Destroy(other.gameObject);
}
}
using UnityEngine;
using System.Collections;
using UnityEngine.SceneManagement;
public class Destroy : MonoBehaviour
{
public GameObject explosion; //игровой объект для взрыва астеройда
public GameObject playerExplosion; //игровой объект для взрыва корабля игрока
void OnTriggerEnter(Collider other)
{
if (other.tag == "Player")
{
}
Destroy(gameObject);
Destroy(other.gameObject);
var objs = GameObject.FindGameObjectsWithTag("Lose");
for (int i = 0; i < objs.Length; i++)
{
objs.setActive(true);
}
}
}
using UnityEngine;
using System.Collections;
public class NewBehaviour : MonoBehaviour
{
public GameObject player;
public int speedRotation = 3;
public int speed = 5;
public int jumpSpeed = 50;
void Start()
{
player = (GameObject)this.gameObject;
}
void Update()
{
{
player.transform.position += player.transform.-right * speed * Time.deltaTime;
}
}
}