BasicKnowledgeUnity/UnityProject/Assets/Scripts/Lesson_7.cs
Dvurechensky 570f1eec6b 1.0.1
update all
2025-05-12 01:29:30 +03:00

32 lines
808 B
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
* Author: Nikolay Dvurechensky
* Site: https://www.dvurechensky.pro/
* Gmail: dvurechenskysoft@gmail.com
* Last Updated: 12 мая 2025 01:23:16
* Version: 1.0.3
*/
using UnityEngine;
/*
* Создаёт объект для Lesson_8
* События OnCollision и OnTrigger
* проявляющееся на объекте Cube
* после соприкосновения с Wall
*/
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);
}
}