Example #1
0
    void CompleteCookMenu() //요리 완료
    {
        targetPlayer = null;
        timer        = 0;
        bool preActive = kitchenUI.transform.GetChild((int)TITLE.COOK + 1).gameObject.activeSelf; //원래 활성화 상태 저장

        kitchenUI.transform.GetChild((int)TITLE.COOK + 1).gameObject.SetActive(true);             //임시로 활성화

        CookingUI  cookingUI  = kitchenUI.GetComponentInChildren <CookingUI>();
        GameObject orderPanel = cookingUI.FindMenuInOrderPanel(menu);

        orderPanel.GetComponent <CookOrderPanelUI>().CompleteThisOrder();

        kitchenUI.transform.GetChild((int)TITLE.COOK + 1).gameObject.SetActive(preActive);  //이전 활성화 상태로 되돌림
        menu = null;
    }
Example #2
0
 private void ToggleCookingUI()
 {
     fireUIOpen = !fireUIOpen;
     cook       = fireColliderID.gameObject.GetComponent <Fire>().cookingUI;
     foreach (Transform cookSlot in cook.transform)
     {
         if (cookSlot.GetComponent <Image> () != null)
         {
             cookSlot.GetComponent <Image> ().enabled = !cookSlot.GetComponent <Image> ().enabled;
         }
         else
         {
             cookSlot.GetComponent <Text> ().enabled = !cookSlot.GetComponent <Text> ().enabled;
         }
     }
     cook.GetComponent <Image>().enabled = !cook.GetComponent <Image>().enabled;
 }
Example #3
0
 // Use this for initialization
 void Awake()
 {
     player         = GameObject.Find("Player");
     warmth         = GameObject.Find("Warmth");
     animRenderer   = GetComponent <Renderer>() as SpriteRenderer;
     canvas         = GameObject.Find("Canvas").GetComponent <Canvas>();
     cookingUI      = Instantiate(Resources.Load <CookingUI>("CookingUI"));
     cookingUI.name = "CookingUI";
     cookingUI.Initialize(slotNum);
     cookingUI.transform.SetParent(canvas.transform);
     // Get a reference to game object renderer and
     // cast it to a Sprite Renderer
     animRenderer = GetComponent <Renderer>() as SpriteRenderer;
     //Sets the animation to the first frame
     timeSinceLastFrame = 0;
     fireState          = -1;
     sound = GetComponent <AudioSource>();
 }
Example #4
0
        public override void Unload()
        {
            if (!Main.dedServ)
            {
                RiftRecipes = null;

                StaminaUserInterface    = null;
                CollectionUserInterface = null;
                OverlayUserInterface    = null;
                InfusionUserInterface   = null;
                CookingUserInterface    = null;
                TextCardUserInterface   = null;
                CodexUserInterface      = null;
                CodexPopupUserInterface = null;
                LootUserInterface       = null;
                ChatboxUserInterface    = null;
                ExtraNPCInterface       = null;
                RichTextInterface       = null;

                stamina       = null;
                collection    = null;
                overlay       = null;
                infusion      = null;
                cooking       = null;
                textcard      = null;
                codex         = null;
                codexpopup    = null;
                lootUI        = null;
                Chatbox       = null;
                ExtraNPCState = null;
                RichText      = null;

                Instance = null;
                AbilityKeys.Unload();
            }

            UnhookIL();
            Main.OnPreDraw -= TestLighting;
        }
Example #5
0
        public override void Load()
        {
            //Shaders
            if (!Main.dedServ)
            {
                GameShaders.Misc["StarlightRiver:Distort"] = new MiscShaderData(new Ref <Effect>(GetEffect("Effects/Distort")), "Distort");

                Ref <Effect> screenRef4 = new Ref <Effect>(GetEffect("Effects/Shockwave"));
                Filters.Scene["ShockwaveFilter"] = new Filter(new ScreenShaderData(screenRef4, "ShockwavePass"), EffectPriority.VeryHigh);
                Filters.Scene["ShockwaveFilter"].Load();

                Ref <Effect> screenRef3 = new Ref <Effect>(GetEffect("Effects/WaterEffect"));
                Filters.Scene["WaterFilter"] = new Filter(new ScreenShaderData(screenRef3, "WaterPass"), EffectPriority.VeryHigh);
                Filters.Scene["WaterFilter"].Load();

                Ref <Effect> screenRef2 = new Ref <Effect>(GetEffect("Effects/AuraEffect"));
                Filters.Scene["AuraFilter"] = new Filter(new ScreenShaderData(screenRef2, "AuraPass"), EffectPriority.VeryHigh);
                Filters.Scene["AuraFilter"].Load();

                Ref <Effect> screenRef = new Ref <Effect>(GetEffect("Effects/BlurEffect"));
                Filters.Scene["BlurFilter"] = new Filter(new ScreenShaderData(screenRef, "BlurPass"), EffectPriority.High);
                Filters.Scene["BlurFilter"].Load();

                Ref <Effect> screenRef5 = new Ref <Effect>(GetEffect("Effects/Purity"));
                Filters.Scene["PurityFilter"] = new Filter(new ScreenShaderData(screenRef5, "PurityPass"), EffectPriority.High);
                Filters.Scene["PurityFilter"].Load();

                Ref <Effect> screenRef6 = new Ref <Effect>(GetEffect("Effects/LightShader"));
                Filters.Scene["Lighting"] = new Filter(new ScreenShaderData(screenRef6, "LightingPass"), EffectPriority.High);
                Filters.Scene["Lighting"].Load();

                Ref <Effect> screenRef7 = new Ref <Effect>(GetEffect("Effects/LightApply"));
                Filters.Scene["LightingApply"] = new Filter(new ScreenShaderData(screenRef7, "LightingApplyPass"), EffectPriority.High);
                Filters.Scene["LightingApply"].Load();

                Ref <Effect> screenRef8 = new Ref <Effect>(GetEffect("Effects/pixelationFull"));
                Filters.Scene["Pixelation"] = new Filter(new ScreenShaderData(screenRef8, "PixelationPass"), EffectPriority.Medium);
                Filters.Scene["Pixelation"].Load();

                Ref <Effect> screenRefCrystal = new Ref <Effect>(GetEffect("Effects/CrystalRefraction"));
                Filters.Scene["Crystal"] = new Filter(new ScreenShaderData(screenRefCrystal, "CrystalPass"), EffectPriority.High);
                Filters.Scene["Crystal"].Load();

                Ref <Effect> screenRefIceCrystal = new Ref <Effect>(GetEffect("Effects/IceCrystal"));
                Filters.Scene["IceCrystal"] = new Filter(new ScreenShaderData(screenRefIceCrystal, "IcePass"), EffectPriority.High);
                Filters.Scene["IceCrystal"].Load();

                Ref <Effect> screenRefWaves = new Ref <Effect>(GetEffect("Effects/Waves"));
                Filters.Scene["Waves"] = new Filter(new ScreenShaderData(screenRefWaves, "WavesPass"), EffectPriority.High);
                Filters.Scene["Waves"].Load();

                Ref <Effect> screenRefWaterShine = new Ref <Effect>(GetEffect("Effects/WaterShine"));
                Filters.Scene["WaterShine"] = new Filter(new ScreenShaderData(screenRefWaterShine, "WaterShinePass"), EffectPriority.High);
                Filters.Scene["WaterShine"].Load();

                lightingTest = new RenderTest();
            }

            //Autoload Rift Recipes
            RiftRecipes = new List <RiftRecipe>();
            AutoloadRiftRecipes(RiftRecipes);

            //Furniture
            AutoloadFurniture();

            //UI
            if (!Main.dedServ)
            {
                //Hotkeys
                AbilityKeys = new AbilityHotkeys(this);
                AbilityKeys.LoadDefaults();

                StaminaUserInterface      = new UserInterface();
                CollectionUserInterface   = new UserInterface();
                OverlayUserInterface      = new UserInterface();
                InfusionUserInterface     = new UserInterface();
                CookingUserInterface      = new UserInterface();
                KeyInventoryUserInterface = new UserInterface();
                TextCardUserInterface     = new UserInterface();
                CodexUserInterface        = new UserInterface();
                CodexPopupUserInterface   = new UserInterface();
                LootUserInterface         = new UserInterface();
                ChatboxUserInterface      = new UserInterface();
                ExtraNPCInterface         = new UserInterface();
                RichTextInterface         = new UserInterface();

                stamina      = new Stamina();
                collection   = new Collection();
                overlay      = new ParticleOverlay();
                infusion     = new Infusion();
                cooking      = new CookingUI();
                keyinventory = new KeyInventory();
                textcard     = new TextCard();
                codex        = new GUI.Codex();
                codexpopup   = new CodexPopup();
                lootUI       = new LootUI();
                Chatbox      = new ChatboxOverUI();
                RichText     = new RichTextBox();

                StaminaUserInterface.SetState(stamina);
                CollectionUserInterface.SetState(collection);
                OverlayUserInterface.SetState(overlay);
                InfusionUserInterface.SetState(infusion);
                CookingUserInterface.SetState(cooking);
                KeyInventoryUserInterface.SetState(keyinventory);
                TextCardUserInterface.SetState(textcard);
                CodexUserInterface.SetState(codex);
                CodexPopupUserInterface.SetState(codexpopup);
                LootUserInterface.SetState(lootUI);
                ChatboxUserInterface.SetState(Chatbox);
                RichTextInterface.SetState(RichText);
            }

            //particle systems
            if (!Main.dedServ)
            {
                LoadVitricBGSystems();
            }

            //Hooking
            HookOn();
            HookIL();
        }