Beispiel #1
0
        public void Unregister()
        {
            if (!IsRegistered)
            {
                return;
            }

            IsRegistered = false;
            VertexLightingUtil.UnregisterVertexLitObject(this);
        }
Beispiel #2
0
        public void Register()
        {
            if (IsRegistered)
            {
                return;
            }

            IsRegistered = true;
            VertexLightingUtil.RegisterVertexLitObject(this);
        }
 public void Start()
 {
     VertexLightingUtil.RegisterVertexLightDependentObject(this);
 }
Beispiel #4
0
 /// <summary>
 /// If an Abnormal Effect Color has been set, this needs to be called to make sure that the previous color will be ignored from now on.
 /// </summary>
 public void UnsetAbnormalEffectColor()
 {
     HasAbnormalEffectColor = false;
     VertexLightingUtil.ForcePaint(this);
 }
Beispiel #5
0
 /// <summary>
 /// Sets a base color that will be used when painting this object. Useful for Abnormal Effects such as Poisoned and so on.
 /// Must call UnsetAbnormalEffectColor to return to the default behavior.
 /// </summary>
 /// <param name="color">Color.</param>
 public void SetAbnormalEffectColor(Color32 color)
 {
     AbnormalEffectColor    = color;
     HasAbnormalEffectColor = true;
     VertexLightingUtil.ForcePaint(this);
 }
 private void Awake()
 {
     VertexLightingUtil.Setup(SceneConfig);
 }
 private void Update()
 {
     VertexLightingUtil.Update();
 }
 private void OnEnable()
 {
     VertexLightingUtil.SetVertexLightVariant(TimeIndex);
 }
 private void OnDestroy()
 {
     VertexLightingUtil.Release();
 }
 protected void OnDisable()
 {
     VertexLightingUtil.UnregisterVertexLight(this);
 }
 protected virtual void OnEnable()
 {
     VertexLightingUtil.RegisterVertexLight(this);
 }