63 lines
1.3 KiB
C#
63 lines
1.3 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using InfallibleCode;
|
|
|
|
public class LightsGroupManagment : MonoBehaviour
|
|
{
|
|
public List<LightAnimationUpdate> lightAnimationUpdate;
|
|
public List<NewLightSwitch> lightSwitch;
|
|
|
|
#region Light Animation Update
|
|
public void StartFlickering()
|
|
{
|
|
foreach (var _lightAnimationUpdate in lightAnimationUpdate)
|
|
{
|
|
_lightAnimationUpdate.StartFlickering();
|
|
}
|
|
}
|
|
|
|
public void StopFlickering()
|
|
{
|
|
foreach (var _lightAnimationUpdate in lightAnimationUpdate)
|
|
{
|
|
_lightAnimationUpdate.StopFlickering();
|
|
}
|
|
}
|
|
#endregion
|
|
|
|
#region Light Switch
|
|
public void CanInteractWithLightSwitches()
|
|
{
|
|
foreach (var _lightSwitch in lightSwitch)
|
|
{
|
|
_lightSwitch.CanTurnOnLight();
|
|
}
|
|
}
|
|
|
|
public void CannotInteractWithLightSwitches()
|
|
{
|
|
foreach (var _lightSwitch in lightSwitch)
|
|
{
|
|
_lightSwitch.CannotTurnOnLight();
|
|
}
|
|
}
|
|
|
|
public void TurnLightsON()
|
|
{
|
|
foreach (var _lightSwitch in lightSwitch)
|
|
{
|
|
_lightSwitch.LightOn();
|
|
}
|
|
}
|
|
|
|
public void TurnLightsOFF()
|
|
{
|
|
foreach (var _lightSwitch in lightSwitch)
|
|
{
|
|
_lightSwitch.LightOn();
|
|
}
|
|
}
|
|
#endregion
|
|
}
|