Initial Commit
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
using System.Collections.Generic;
|
||||
using KitchenLib.Utils;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Easter2025.Views.Local
|
||||
{
|
||||
public class EggPileView : MonoBehaviour
|
||||
{
|
||||
public List<GameObject> EggContainers = new List<GameObject>();
|
||||
private void Awake()
|
||||
{
|
||||
foreach (GameObject eggContainer in EggContainers)
|
||||
{
|
||||
foreach (Transform Egg in eggContainer.transform)
|
||||
{
|
||||
Egg.gameObject.SetActive(false);
|
||||
}
|
||||
}
|
||||
|
||||
foreach (GameObject eggContainer in EggContainers)
|
||||
{
|
||||
eggContainer.transform.GetChild(Random.Range(0, eggContainer.transform.childCount)).gameObject.SetActive(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.VFX;
|
||||
|
||||
namespace Easter2025.Views.Local
|
||||
{
|
||||
public class FlamingView : MonoBehaviour
|
||||
{
|
||||
public VisualEffect Fire;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
if (Fire == null) return;
|
||||
Fire.initialEventName = "OnPlay";
|
||||
Fire.SetFloat("Active", 1);
|
||||
Fire.Play();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
using UnityEngine;
|
||||
using Random = UnityEngine.Random;
|
||||
|
||||
namespace Easter2025.Views.Local
|
||||
{
|
||||
public class RandomPlacementView : MonoBehaviour
|
||||
{
|
||||
public Vector3 min = new(0, 0, 0);
|
||||
public Vector3 max = new(0, 0, 0);
|
||||
public GameObject Container;
|
||||
private void Awake()
|
||||
{
|
||||
Container.transform.position = new Vector3(Random.Range(min.x, max.x), Random.Range(min.y, max.y), Random.Range(min.z, max.z)) + Container.transform.position;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using Random = UnityEngine.Random;
|
||||
|
||||
namespace Easter2025.Views.Local
|
||||
{
|
||||
public class RandomRotationView : MonoBehaviour
|
||||
{
|
||||
public float min = -180f;
|
||||
public float max = 180f;
|
||||
public GameObject Container;
|
||||
private void Awake()
|
||||
{
|
||||
Container.transform.rotation = Quaternion.Euler(0, Random.Range(min, max), 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user