예제 #1
0
    void Awake()
    {
        awaked = false;
        info   = InfoHandler.GetInfo();
        if (info == null)
        {
            var mods = new bool[modeInfos.Length];
            mods[0] = true;
            info    = new Info(1f, 1f, 1f, 1f, 0, mods);
            InfoHandler.SetInfo(info);
        }
        if (info.mods.Length != modeInfos.Length)
        {
            var newmods = new bool[modeInfos.Length];
            for (var i = 0; i < info.mods.Length && i < modeInfos.Length; i++)
            {
                newmods[i] = info.mods[i];
            }
            info.mods = newmods;
            InfoHandler.SetInfo(info);
        }
        currentMod = info.mod;

        r.value = info.r;
        g.value = info.g;
        b.value = info.b;
        a.value = info.a;

        awaked = true;
        UpdateMod();
        UpdateColor();
    }
예제 #2
0
 public void SetChagnes()
 {
     InfoHandler.SetInfo(info);
 }