Меню, дверь, цвет

This commit is contained in:
ThomasCharester committed 2025-11-19 14:45:45 +03:00
1 parent c4ab11488b
commit 5da64a7b3d
29 files changed
+1581 -443

No files matched your search

@@ -0,0 +1,23 @@
using DG.Tweening;
using UnityEngine;
namespace Code.Gameplay.Door
{
public class CinematicDoorOpening
{
public DamnDoor DamnDoor;
public Light DoorLight;
public void PreOpen(bool start)
{
DoorLight.DOColor(start ? Color.yellow : Color.red, 0.2f);
DamnDoor.Petlya.DORotate(new Vector3(0, -40, 0), 1f);
}
public void Close()
{
DamnDoor.Petlya.DORotate(new Vector3(0, 0, 0), 1f);
}
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: deda0339570d44609dd62eafd9c6215f
timeCreated: 1763548908
@@ -0,0 +1,16 @@
using UnityEngine;
namespace Code.Gameplay.Door
{
public class DamnDoor : MonoBehaviour
{
[SerializeField] Rigidbody rigidbody;
[SerializeField] private Transform petlya;
public Transform Petlya => petlya;
public void SetPhysics(bool active)
{
rigidbody.isKinematic = active;
}
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 50a6b5e332704611b19f5a209d4dbffe
timeCreated: 1763548314