Skip to content

mogoson/MGS.RedDot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MGS.RedDot

Summary

  • Red dot plugin for C# project.

Environment

  • Unity 5.0 or above.
  • .Net Framework 3.5 or above.

Platform

  • Windows.

Demand

  • Mark a data struct is red(dirty) if self changed or children data struct changed.

Design

  • Base class to collect state changes.
  • Base class to register and unregister children dots.

Usage

  • Inherited from Base class RedDot.
public class Leaf : RedDot
{
    public Color Color
    {
        set
        {
            //Check the value is changed?
            if (value != color)
            {
                color = value;
                
                //Set red state if value is changed.
                IsRed = true;
            }
        }
        get { return color; }
    }
    protected Color color;
}

Copyright © 2022 Mogoson. mogoson@outlook.com