update
This commit is contained in:
@@ -0,0 +1,86 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Ichni.RhythmGame.Beatmap;
|
||||
using Ichni.RhythmGame.ThemeBundles.Basic.Beatmap;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Ichni.RhythmGame.ThemeBundles.Basic
|
||||
{
|
||||
public partial class PointLight : EnvironmentObject
|
||||
{
|
||||
[SerializeField]
|
||||
private Light pointLight;
|
||||
|
||||
public float intensity;
|
||||
public float range;
|
||||
public bool castShadows;
|
||||
|
||||
public static PointLight GenerateElement(string elementName, Guid id, List<string> tags,
|
||||
bool isFirstGenerated, GameElement parentElement, string themeBundleName, string objectName,
|
||||
bool isStatic, float intensity, float range, bool castShadows)
|
||||
{
|
||||
PointLight poLight = EnvironmentObject.GenerateElement(elementName, id, tags,
|
||||
isFirstGenerated, themeBundleName, objectName, parentElement, isStatic).GetComponent<PointLight>();
|
||||
|
||||
poLight.intensity = intensity;
|
||||
poLight.range = range;
|
||||
poLight.castShadows = castShadows;
|
||||
return poLight;
|
||||
}
|
||||
|
||||
public override void Refresh()
|
||||
{
|
||||
base.Refresh();
|
||||
pointLight.color = colorSubmodule.currentBaseColor;
|
||||
pointLight.intensity = intensity;
|
||||
pointLight.range = range;
|
||||
pointLight.shadows = castShadows ? LightShadows.Soft : LightShadows.None;
|
||||
}
|
||||
}
|
||||
|
||||
public partial class PointLight
|
||||
{
|
||||
public override void SaveBM()
|
||||
{
|
||||
matchedBM = new PointLight_BM(elementName, elementGuid, tags, parentElement.matchedBM as GameElement_BM,
|
||||
themeBundleName, objectName, isStatic, intensity, range, castShadows);
|
||||
}
|
||||
}
|
||||
|
||||
namespace Beatmap
|
||||
{
|
||||
public class PointLight_BM : EnvironmentObject_BM
|
||||
{
|
||||
public float intensity;
|
||||
public float range;
|
||||
public bool castShadows;
|
||||
|
||||
public PointLight_BM()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public PointLight_BM(string elementName, Guid elementGuid, List<string> tags, GameElement_BM parentElement,
|
||||
string themeBundleName, string objectName, bool isStatic, float intensity, float range, bool castShadows)
|
||||
: base(elementName, elementGuid, tags, parentElement, themeBundleName, objectName, isStatic)
|
||||
{
|
||||
this.intensity = intensity;
|
||||
this.range = range;
|
||||
this.castShadows = castShadows;
|
||||
}
|
||||
|
||||
public override void ExecuteBM()
|
||||
{
|
||||
matchedElement = PointLight.GenerateElement(elementName, elementGuid, tags, false,
|
||||
GetElement(attachedElementGuid), themeBundleName, objectName, isStatic, intensity, range, castShadows);
|
||||
}
|
||||
|
||||
public override GameElement DuplicateBM(GameElement parent)
|
||||
{
|
||||
return PointLight.GenerateElement(elementName, Guid.NewGuid(), tags, false,
|
||||
parent, themeBundleName, objectName, isStatic, intensity, range, castShadows);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user