BasicKnowledgeUnity/UnityProject/Assets/Scripts/Lesson_7.cs

32 lines
808 B
C#
Raw Normal View History

2025-05-12 01:29:30 +03:00
/*
* Author: Nikolay Dvurechensky
* Site: https://www.dvurechensky.pro/
* Gmail: dvurechenskysoft@gmail.com
2025-05-12 01:31:46 +03:00
* Last Updated: 12 мая 2025 01:30:28
* Version: 1.0.4
2025-05-12 01:29:30 +03:00
*/
2024-10-05 08:54:55 +03:00
using UnityEngine;
/*
2025-05-12 01:29:30 +03:00
* Создаёт объект для Lesson_8
* События OnCollision и OnTrigger
* проявляющееся на объекте Cube
* после соприкосновения с Wall
2024-10-05 08:54:55 +03:00
*/
public class Lesson_7 : MonoBehaviour
{
public GameObject Cube;
public GameObject Cilinder;
[HideInInspector]
public GameObject CloneObj;
private void Start()
{
Instantiate(Cube, Vector3.zero, Quaternion.identity);
CloneObj = Instantiate(Cilinder, new Vector3(0, 7f), Quaternion.identity);
Cube.SetActive(true);
Cilinder.SetActive(true);
}
}