示例#1
0
 void Setup()
 {
     isActive = true;
     player.SetGoWalkMode(DeskPos, AnimDuration);
     fade = gameObject.AddComponent <SimpleFade>();
     fade.Setting(2.0f, panel, GameDirector.IsClearGame());
     fade.set(false);
 }
示例#2
0
 private void Awake()
 {
     Instance   = this;
     transition = 0.0f;
     //Debug.Log(transition);
     fadeImage.color = new Color(1, 1, 1, 0);
     defaultColor    = new Color(1, 1, 1, 0);
     //Fade(false, 2.0f);
 }
示例#3
0
        public static bool Prefix_SimpleFade_Init(SimpleFade __instance)
        {
            if (!boolState.Get("No Fade Animations", true))
            {
                return(true);
            }

            __instance.ForceEnd();

            return(false);
        }
 private static void SimpleFadeUpdate(SimpleFade __instance)
 {
     if (FadeColor.Value != Color.white)
     {
         __instance._Color = FadeColor.Value;
     }
     if (DisableFade.Value)
     {
         __instance.ForceEnd();
     }
 }
示例#5
0
 internal static bool SimpleFadeUpdate(SimpleFade __instance)
 {
     if (UpdateColor)
     {
         __instance._Color = FadeColor.Value;
     }
     if (DisableFade.Value)
     {
         __instance.ForceEnd();
         return(false);
     }
     return(true);
 }
示例#6
0
        public override void Do()
        {
            base.Do();
            int num1 = 0;

            this.fade = (SimpleFade)Singleton <Scene> .Instance.sceneFade;
            SimpleFade fade1 = this.fade;

            string[] args1  = this.args;
            int      index1 = num1;
            int      num2   = index1 + 1;
            int      num3   = !args1[index1].Compare("in", true) ? 1 : 0;

            fade1._Fade     = (SimpleFade.Fade)num3;
            this.bkFadeTime = this.fade._Time;
            string[]        args2  = this.args;
            int             index2 = num2;
            int             num4   = index2 + 1;
            Action <string> act    = (Action <string>)(s => this.fade._Time = float.Parse(s));

            args2.SafeProc(index2, act);
            string[] args3  = this.args;
            int      index3 = num4;
            int      num5   = index3 + 1;
            string   self1  = args3[index3];

            if (!self1.IsNullOrEmpty())
            {
                this.fade._Color = self1.GetColor();
            }
            string[] args4  = this.args;
            int      index4 = num5;
            int      num6   = index4 + 1;
            string   self2  = args4[index4];

            if (!self2.IsNullOrEmpty())
            {
                SimpleFade  fade2           = this.fade;
                string      assetBundleName = self2;
                string[]    args5           = this.args;
                int         index5          = num6;
                int         num7            = index5 + 1;
                string      assetName       = args5[index5];
                System.Type type            = typeof(Texture2D);
                Texture2D   asset           = AssetBundleManager.LoadAsset(assetBundleName, assetName, type, (string)null).GetAsset <Texture2D>();
                fade2._Texture = asset;
            }
            this.fade.Init();
        }
示例#7
0
    void Start()
    {
        fadeManager = SimpleFade.Instance;

        //initial check if there is anything already accidentally loaded
        if (Application.isEditor)
        {
            for (int i = 0; i < SceneManager.sceneCount; i++)
            {
                Scene loadedScene = SceneManager.GetSceneAt(i);
                //make sure level contains word Maze
                if (loadedScene.name.Contains("Maze"))
                {
                    SceneManager.SetActiveScene(loadedScene);
                    loadedLevelBuildIndex = loadedScene.buildIndex;
                    return;
                }
            }
        }
    }
示例#8
0
 void Start()
 {
     simpleFade = SimpleFade.Instance;
 }
示例#9
0
 public void Load(SimpleFade fade)
 {
     fade._Color   = fade._Color.Get(this.color, false, true, true, true);
     fade._Time    = this.time;
     fade._Texture = this.texture;
 }
示例#10
0
 public FadeData(SimpleFade fade)
 {
     this.color   = fade._Color;
     this.time    = fade._Time;
     this.texture = fade._Texture;
 }
示例#11
0
 public FadeInOut(SimpleFade fade)
 {
     this.inTime  = this.outTime = fade._Time;
     this.inColor = this.outColor = fade._Color;
 }