public static void OnMeetingStart()
        {
            Role.allRoles.Do(x => x.OnMeetingStart());
            Modifier.allModifiers.Do(x => x.OnMeetingStart());

            GM.resetZoom();
            DestroyableSingleton <HudManager> ._instance.StartCoroutine(Effects.Lerp(3f, new Action <float>((p) =>
            {
                if (p == 1)
                {
                    Camouflager.resetCamouflage();
                    Morphling.resetMorph();
                }
            })));
        }
        static void camouflageAndMorphActions()
        {
            float oldCamouflageTimer = Camouflager.camouflageTimer;
            float oldMorphTimer      = Morphling.morphTimer;

            Camouflager.camouflageTimer -= Time.deltaTime;
            Morphling.morphTimer        -= Time.deltaTime;

            // Morphling player size not done here

            // Set morphling morphed look
            if (Morphling.morphTimer > 0f && Camouflager.camouflageTimer <= 0f)
            {
                if (Morphling.morphling != null && Morphling.morphTarget != null)
                {
                    Morphling.morphling.nameText.Text = Morphling.morphTarget.IDOFAMCIJKE.HGGCLJHCDBM;
                    Morphling.morphling.LNMJKMLHMIM.material.SetColor("_BackColor", Palette.CHIIBPFJACF[Morphling.morphTarget.IDOFAMCIJKE.JFHFMIKFHGG]);
                    Morphling.morphling.LNMJKMLHMIM.material.SetColor("_BodyColor", Palette.CALCLMEEPGL[Morphling.morphTarget.IDOFAMCIJKE.JFHFMIKFHGG]);
                    Morphling.morphling.LNMJKMLHMIM.material.SetFloat("_Outline", Morphling.morphTarget.LNMJKMLHMIM.material.GetFloat("_Outline"));
                    Morphling.morphling.LNMJKMLHMIM.material.SetColor("_OutlineColor", Morphling.morphTarget.LNMJKMLHMIM.material.GetColor("_OutlineColor"));
                    Morphling.morphling.HatRenderer.SetHat(Morphling.morphTarget.IDOFAMCIJKE.MFIOGLKPMGD, Morphling.morphTarget.IDOFAMCIJKE.JFHFMIKFHGG);
                    Morphling.morphling.nameText.transform.localPosition = new Vector3(0f, (Morphling.morphTarget.IDOFAMCIJKE.MFIOGLKPMGD == 0U) ? 0.7f : 1.05f, -0.5f);

                    if (Morphling.morphling.MyPhysics.Skin.skin.ProdId != DestroyableSingleton <HatManager> .CMJOLNCMAPD.AllSkins[(int)Morphling.morphTarget.IDOFAMCIJKE.LFDAHOFPIAM].ProdId)
                    {
                        Helpers.setSkinWithAnim(Morphling.morphling.MyPhysics, Morphling.morphTarget.IDOFAMCIJKE.LFDAHOFPIAM);
                    }
                    if (Morphling.morphling.CurrentPet == null || Morphling.morphling.CurrentPet.EKONGILOOPE != DestroyableSingleton <HatManager> .CMJOLNCMAPD.AllPets[(int)Morphling.morphTarget.IDOFAMCIJKE.GKFOHNJHFOE].EKONGILOOPE)
                    {
                        if (Morphling.morphling.CurrentPet)
                        {
                            UnityEngine.Object.Destroy(Morphling.morphling.CurrentPet.gameObject);
                        }
                        Morphling.morphling.CurrentPet = UnityEngine.Object.Instantiate <PetBehaviour>(DestroyableSingleton <HatManager> .CMJOLNCMAPD.AllPets[(int)Morphling.morphTarget.IDOFAMCIJKE.GKFOHNJHFOE]);
                        Morphling.morphling.CurrentPet.transform.position = Morphling.morphling.transform.position;
                        Morphling.morphling.CurrentPet.Source             = Morphling.morphling;
                        Morphling.morphling.CurrentPet.FHBHBMIJFID        = Morphling.morphling.FHBHBMIJFID;
                        PlayerControl.SetPlayerMaterialColors(Morphling.morphTarget.IDOFAMCIJKE.JFHFMIKFHGG, Morphling.morphling.CurrentPet.rend);
                    }
                    else if (Morphling.morphling.CurrentPet)
                    {
                        PlayerControl.SetPlayerMaterialColors(Morphling.morphTarget.IDOFAMCIJKE.JFHFMIKFHGG, Morphling.morphling.CurrentPet.rend);
                    }
                }
            }

            // Set camouflaged look (overrides morphling morphed look if existent)
            if (Camouflager.camouflageTimer > 0f)
            {
                foreach (PlayerControl p in PlayerControl.AllPlayerControls)
                {
                    p.nameText.Text = "";
                    p.LNMJKMLHMIM.material.SetColor("_BackColor", Palette.CALCLMEEPGL[6]);
                    p.LNMJKMLHMIM.material.SetColor("_BodyColor", Palette.CALCLMEEPGL[6]);
                    p.LNMJKMLHMIM.material.SetFloat("_Outline", 0f);
                    p.HatRenderer.SetHat(0, 0);
                    Helpers.setSkinWithAnim(p.MyPhysics, 0);
                    bool spawnPet = false;
                    if (p.CurrentPet == null)
                    {
                        spawnPet = true;
                    }
                    else if (p.CurrentPet.EKONGILOOPE != DestroyableSingleton <HatManager> .CMJOLNCMAPD.AllPets[0].EKONGILOOPE)
                    {
                        UnityEngine.Object.Destroy(p.CurrentPet.gameObject);
                        spawnPet = true;
                    }

                    if (spawnPet)
                    {
                        p.CurrentPet = UnityEngine.Object.Instantiate <PetBehaviour>(DestroyableSingleton <HatManager> .CMJOLNCMAPD.AllPets[0]);
                        p.CurrentPet.transform.position = p.transform.position;
                        p.CurrentPet.Source             = p;
                    }
                }
            }

            // Everyone but morphling reset
            if (oldCamouflageTimer > 0f && Camouflager.camouflageTimer <= 0f)
            {
                Camouflager.resetCamouflage();
            }

            // Morphling reset
            if ((oldMorphTimer > 0f || oldCamouflageTimer > 0f) && Camouflager.camouflageTimer <= 0f && Morphling.morphTimer <= 0f && Morphling.morphling != null)
            {
                Morphling.resetMorph();
            }
        }
Exemple #3
0
        static void camouflageAndMorphActions()
        {
            float oldCamouflageTimer = Camouflager.camouflageTimer;
            float oldMorphTimer      = Morphling.morphTimer;

            Camouflager.camouflageTimer -= Time.deltaTime;
            Morphling.morphTimer        -= Time.deltaTime;

            // Morphling player size not done here

            // Set morphling morphed look
            if (Morphling.morphTimer > 0f && Camouflager.camouflageTimer <= 0f)
            {
                if (Morphling.morphling != null && Morphling.morphTarget != null)
                {
                    Morphling.morphling.nameText.text = hidePlayerName(PlayerControl.LocalPlayer, Morphling.morphling) ? "" : Morphling.morphTarget.Data.PlayerName;
                    Morphling.morphling.myRend.material.SetColor("_BackColor", Palette.ShadowColors[Morphling.morphTarget.Data.ColorId]);
                    Morphling.morphling.myRend.material.SetColor("_BodyColor", Palette.PlayerColors[Morphling.morphTarget.Data.ColorId]);
                    Morphling.morphling.HatRenderer.SetHat(Morphling.morphTarget.Data.HatId, Morphling.morphTarget.Data.ColorId);
                    Morphling.morphling.nameText.transform.localPosition = new Vector3(0f, (Morphling.morphTarget.Data.HatId == 0U) ? 0.7f : 1.05f, -0.5f);

                    if (Morphling.morphling.MyPhysics.Skin.skin.ProdId != DestroyableSingleton <HatManager> .Instance.AllSkins[(int)Morphling.morphTarget.Data.SkinId].ProdId)
                    {
                        Helpers.setSkinWithAnim(Morphling.morphling.MyPhysics, Morphling.morphTarget.Data.SkinId);
                    }
                    if (Morphling.morphling.CurrentPet == null || Morphling.morphling.CurrentPet.ProdId != DestroyableSingleton <HatManager> .Instance.AllPets[(int)Morphling.morphTarget.Data.PetId].ProdId)
                    {
                        if (Morphling.morphling.CurrentPet)
                        {
                            UnityEngine.Object.Destroy(Morphling.morphling.CurrentPet.gameObject);
                        }
                        Morphling.morphling.CurrentPet = UnityEngine.Object.Instantiate <PetBehaviour>(DestroyableSingleton <HatManager> .Instance.AllPets[(int)Morphling.morphTarget.Data.PetId]);
                        Morphling.morphling.CurrentPet.transform.position = Morphling.morphling.transform.position;
                        Morphling.morphling.CurrentPet.Source             = Morphling.morphling;
                        Morphling.morphling.CurrentPet.Visible            = Morphling.morphling.Visible;
                        PlayerControl.SetPlayerMaterialColors(Morphling.morphTarget.Data.ColorId, Morphling.morphling.CurrentPet.rend);
                    }
                    else if (Morphling.morphling.CurrentPet)
                    {
                        PlayerControl.SetPlayerMaterialColors(Morphling.morphTarget.Data.ColorId, Morphling.morphling.CurrentPet.rend);
                    }
                }
            }

            // Set camouflaged look (overrides morphling morphed look if existent)
            if (Camouflager.camouflageTimer > 0f)
            {
                foreach (PlayerControl p in PlayerControl.AllPlayerControls)
                {
                    p.nameText.text = "";
                    p.myRend.material.SetColor("_BackColor", Palette.PlayerColors[6]);
                    p.myRend.material.SetColor("_BodyColor", Palette.PlayerColors[6]);
                    p.HatRenderer.SetHat(0, 0);
                    Helpers.setSkinWithAnim(p.MyPhysics, 0);
                    bool spawnPet = false;
                    if (p.CurrentPet == null)
                    {
                        spawnPet = true;
                    }
                    else if (p.CurrentPet.ProdId != DestroyableSingleton <HatManager> .Instance.AllPets[0].ProdId)
                    {
                        UnityEngine.Object.Destroy(p.CurrentPet.gameObject);
                        spawnPet = true;
                    }

                    if (spawnPet)
                    {
                        p.CurrentPet = UnityEngine.Object.Instantiate <PetBehaviour>(DestroyableSingleton <HatManager> .Instance.AllPets[0]);
                        p.CurrentPet.transform.position = p.transform.position;
                        p.CurrentPet.Source             = p;
                    }
                }
            }

            // Everyone but morphling reset
            if (oldCamouflageTimer > 0f && Camouflager.camouflageTimer <= 0f)
            {
                Camouflager.resetCamouflage();
            }

            // Morphling reset
            if ((oldMorphTimer > 0f || oldCamouflageTimer > 0f) && Camouflager.camouflageTimer <= 0f && Morphling.morphTimer <= 0f && Morphling.morphling != null)
            {
                Morphling.resetMorph();
            }
        }
        static void camouflageAndMorphActions()
        {
            float oldCamouflageTimer = Camouflager.camouflageTimer;
            float oldMorphTimer      = Morphling.morphTimer;

            Camouflager.camouflageTimer -= Time.deltaTime;
            Morphling.morphTimer        -= Time.deltaTime;

            // Morphling player size not done here

            // Set morphling morphed look
            if (Morphling.morphTimer > 0f && Camouflager.camouflageTimer <= 0f)
            {
                if (Morphling.morphling != null && Morphling.morphTarget != null)
                {
                    Morphling.morphling.nameText.text = Morphling.morphTarget.PPMOEEPBHJO.PCLLABJCIPC;
                    Morphling.morphling.KJAENOGGEOK.material.SetColor("_BackColor", Palette.PHFOPNDOEMD[Morphling.morphTarget.PPMOEEPBHJO.IMMNCAGJJJC]);
                    Morphling.morphling.KJAENOGGEOK.material.SetColor("_BodyColor", Palette.AEDCMKGJKAG[Morphling.morphTarget.PPMOEEPBHJO.IMMNCAGJJJC]);
                    Morphling.morphling.KJAENOGGEOK.material.SetFloat("_Outline", Morphling.morphTarget.KJAENOGGEOK.material.GetFloat("_Outline"));
                    Morphling.morphling.KJAENOGGEOK.material.SetColor("_OutlineColor", Morphling.morphTarget.KJAENOGGEOK.material.GetColor("_OutlineColor"));
                    Morphling.morphling.HatRenderer.SetHat(Morphling.morphTarget.PPMOEEPBHJO.CPGFLBANALE, Morphling.morphTarget.PPMOEEPBHJO.IMMNCAGJJJC);
                    Morphling.morphling.nameText.transform.localPosition = new Vector3(0f, (Morphling.morphTarget.PPMOEEPBHJO.CPGFLBANALE == 0U) ? 0.7f : 1.05f, -0.5f);

                    if (Morphling.morphling.MyPhysics.Skin.skin.ProdId != DestroyableSingleton <HatManager> .CHNDKKBEIDG.AllSkins[(int)Morphling.morphTarget.PPMOEEPBHJO.CGNMKICGLOG].ProdId)
                    {
                        Helpers.setSkinWithAnim(Morphling.morphling.MyPhysics, Morphling.morphTarget.PPMOEEPBHJO.CGNMKICGLOG);
                    }
                    if (Morphling.morphling.CurrentPet == null || Morphling.morphling.CurrentPet.OPADMIKFGHK != DestroyableSingleton <HatManager> .CHNDKKBEIDG.AllPets[(int)Morphling.morphTarget.PPMOEEPBHJO.LBHODBKCBKA].OPADMIKFGHK)
                    {
                        if (Morphling.morphling.CurrentPet)
                        {
                            UnityEngine.Object.Destroy(Morphling.morphling.CurrentPet.gameObject);
                        }
                        Morphling.morphling.CurrentPet = UnityEngine.Object.Instantiate <PetBehaviour>(DestroyableSingleton <HatManager> .CHNDKKBEIDG.AllPets[(int)Morphling.morphTarget.PPMOEEPBHJO.LBHODBKCBKA]);
                        Morphling.morphling.CurrentPet.transform.position = Morphling.morphling.transform.position;
                        Morphling.morphling.CurrentPet.Source             = Morphling.morphling;
                        Morphling.morphling.CurrentPet.BDBDGFDELMB        = Morphling.morphling.BDBDGFDELMB;
                        PlayerControl.SetPlayerMaterialColors(Morphling.morphTarget.PPMOEEPBHJO.IMMNCAGJJJC, Morphling.morphling.CurrentPet.rend);
                    }
                    else if (Morphling.morphling.CurrentPet)
                    {
                        PlayerControl.SetPlayerMaterialColors(Morphling.morphTarget.PPMOEEPBHJO.IMMNCAGJJJC, Morphling.morphling.CurrentPet.rend);
                    }
                }
            }

            // Set camouflaged look (overrides morphling morphed look if existent)
            if (Camouflager.camouflageTimer > 0f)
            {
                foreach (PlayerControl p in PlayerControl.AllPlayerControls)
                {
                    p.nameText.text = "";
                    p.KJAENOGGEOK.material.SetColor("_BackColor", Palette.AEDCMKGJKAG[6]);
                    p.KJAENOGGEOK.material.SetColor("_BodyColor", Palette.AEDCMKGJKAG[6]);
                    p.KJAENOGGEOK.material.SetFloat("_Outline", 0f);
                    p.HatRenderer.SetHat(0, 0);
                    Helpers.setSkinWithAnim(p.MyPhysics, 0);
                    bool spawnPet = false;
                    if (p.CurrentPet == null)
                    {
                        spawnPet = true;
                    }
                    else if (p.CurrentPet.OPADMIKFGHK != DestroyableSingleton <HatManager> .CHNDKKBEIDG.AllPets[0].OPADMIKFGHK)
                    {
                        UnityEngine.Object.Destroy(p.CurrentPet.gameObject);
                        spawnPet = true;
                    }

                    if (spawnPet)
                    {
                        p.CurrentPet = UnityEngine.Object.Instantiate <PetBehaviour>(DestroyableSingleton <HatManager> .CHNDKKBEIDG.AllPets[0]);
                        p.CurrentPet.transform.position = p.transform.position;
                        p.CurrentPet.Source             = p;
                    }
                }
            }

            // Everyone but morphling reset
            if (oldCamouflageTimer > 0f && Camouflager.camouflageTimer <= 0f)
            {
                Camouflager.resetCamouflage();
            }

            // Morphling reset
            if ((oldMorphTimer > 0f || oldCamouflageTimer > 0f) && Camouflager.camouflageTimer <= 0f && Morphling.morphTimer <= 0f && Morphling.morphling != null)
            {
                Morphling.resetMorph();
            }
        }