mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2024-11-27 14:30:17 +00:00
24 lines
691 B
C#
24 lines
691 B
C#
using SanAndreasUnity.Importing.RenderWareStream;
|
|
using UnityEngine;
|
|
|
|
namespace SanAndreasUnity.Behaviours.World
|
|
{
|
|
public class LightSource : MonoBehaviour
|
|
{
|
|
public TwoDEffect.Light LightInfo { get; private set; }
|
|
|
|
public static LightSource Create(
|
|
Transform parent,
|
|
TwoDEffect.Light lightInfo)
|
|
{
|
|
var go = GameObject.CreatePrimitive(PrimitiveType.Cube);
|
|
go.transform.SetParent(parent);
|
|
go.transform.localPosition = lightInfo.Position;
|
|
|
|
var lightSource = go.AddComponent<LightSource>();
|
|
lightSource.LightInfo = lightInfo;
|
|
|
|
return lightSource;
|
|
}
|
|
}
|
|
}
|