mirror of
https://github.com/tym1116/BH3.git
synced 2025-12-16 16:34:41 +01:00
50 lines
1.1 KiB
C#
50 lines
1.1 KiB
C#
using System;
|
|
using UnityEngine;
|
|
|
|
namespace MoleMole
|
|
{
|
|
[Serializable]
|
|
public struct LightProbProperties
|
|
{
|
|
public Color bodyColor;
|
|
|
|
public Color shadowColor;
|
|
|
|
public static LightProbProperties Lerp(LightProbProperties a, LightProbProperties b, float t)
|
|
{
|
|
return new LightProbProperties
|
|
{
|
|
bodyColor = Color.Lerp(a.bodyColor, b.bodyColor, t),
|
|
shadowColor = Color.Lerp(a.shadowColor, b.shadowColor, t)
|
|
};
|
|
}
|
|
|
|
public static LightProbProperties operator +(LightProbProperties a, LightProbProperties b)
|
|
{
|
|
return new LightProbProperties
|
|
{
|
|
bodyColor = a.bodyColor + b.bodyColor,
|
|
shadowColor = a.shadowColor + b.shadowColor
|
|
};
|
|
}
|
|
|
|
public static LightProbProperties operator *(LightProbProperties a, float b)
|
|
{
|
|
return new LightProbProperties
|
|
{
|
|
bodyColor = a.bodyColor * b,
|
|
shadowColor = a.shadowColor * b
|
|
};
|
|
}
|
|
|
|
public static LightProbProperties operator /(LightProbProperties a, float b)
|
|
{
|
|
return new LightProbProperties
|
|
{
|
|
bodyColor = a.bodyColor / b,
|
|
shadowColor = a.shadowColor / b
|
|
};
|
|
}
|
|
}
|
|
}
|