Class M2Light
One placed light. Abstract over the client version; construct a concrete version with M2Light.ForVersion / for_version.
public class M2Light : IDisposable
- Inheritance
-
M2Light
- Implements
- Derived
- Inherited Members
Constructors
M2Light()
public M2Light()
M2Light(M2Light)
Copy-construct: a deep copy of other (the C++ copy constructor).
public M2Light(M2Light other)
Parameters
otherM2Light
Properties
AmbientColor
RGB ambient color (no alpha).
public M2TrackC3Vector AmbientColor { get; set; }
Property Value
AmbientIntensity
Multiplies the ambient color; defaults to 1.0.
public M2TrackFloat AmbientIntensity { get; set; }
Property Value
AttenuationEnd
Distance where the light fades out entirely.
public M2TrackFloat AttenuationEnd { get; set; }
Property Value
AttenuationStart
Distance where attenuation begins.
public M2TrackFloat AttenuationStart { get; set; }
Property Value
Bone
Bone to attach to, -1 for none.
public short Bone { get; set; }
Property Value
DiffuseColor
RGB diffuse color (no alpha).
public M2TrackC3Vector DiffuseColor { get; set; }
Property Value
DiffuseIntensity
Multiplies the diffuse color; defaults to 1.0.
public M2TrackFloat DiffuseIntensity { get; set; }
Property Value
Position
Relative to the bone, if any.
public C3Vector Position { get; set; }
Property Value
Type
0 directional, 1 point.
public ushort Type { get; set; }
Property Value
Visibility
Bool track: the light is enabled.
public M2TrackUInt8 Visibility { get; set; }
Property Value
Methods
Dispose()
Release the native object now. Optional: the finalizer releases it on
collection anyway - dispose (or using) when you want native memory back
promptly.
public virtual void Dispose()
Equals(object?)
Determines whether the specified object is equal to the current object.
public override bool Equals(object? obj)
Parameters
objobjectThe object to compare with the current object.
Returns
ForVersion(ClientVersion)
A fresh M2Light for an exact client version — the only axis that can name a Classic client, whose files follow the engine its build was cut on rather than its 1.15 / 4.4 version number.
public static M2Light ForVersion(ClientVersion version)
Parameters
versionClientVersion
Returns
ForVersion(Expansion)
A fresh M2Light for the given era, as the family base — the dynamic twin of the typed Era factories.
public static M2Light ForVersion(Expansion era)
Parameters
eraExpansion
Returns
GetHashCode()
Reference-identity hash (the C++ type has no hash to mirror).
public override int GetHashCode()
Returns
Operators
operator ==(M2Light?, M2Light?)
public static bool operator ==(M2Light? l, M2Light? r)
Parameters
Returns
operator !=(M2Light?, M2Light?)
public static bool operator !=(M2Light? l, M2Light? r)