Ejemplo n.º 1
0
        /// <summary>
        /// Breaks all toilets rendering them unusuable until fixed.
        /// </summary>
        public void ToiletBreakEvent()
        {
            foreach (var toilet in s_toiletPoints)
            {
                toilet.broken = true;
                toilet.myObjects.button.SetActive(true);

                ArrowPointer.ObjectPointer data = new ArrowPointer.ObjectPointer
                {
                    colorOfArrow  = Color.blue,
                    colorOfText   = Color.blue,
                    extraSprite   = MoodIconHolder.MyInstance.iconSpriteRepairNoBackground,
                    extraFunction = true
                };
                ArrowPointer.MyInstance.AddObjectToPointAt(toilet.gameObject, data);

                foreach (var particleSystem in toilet.gameObject.GetComponentsInChildren <ParticleSystem>())
                {
                    particleSystem.Play();
                }
            }
        }
Ejemplo n.º 2
0
    public void RadiatorStart()
    {
        isBroken = true;
        //fixButtonImage.enabled = true;

        fixButton.gameObject.SetActive(true);

        //Play radiator sound here
        if (AudioManager.instance != null)
        {
            //print("Trying to play broken radiator sound");
            AudioManager.instance.PlaySound("RadiatorBroken", gameObject);
        }

        foreach (var npc in nearbyNpcs)
        {
            if (npc == null)
            {
                Debug.LogWarning("Npc went null: ", npc);
                continue;
            }

            foreach (var material in npc.transform.GetChild(0).GetComponentInChildren <SkinnedMeshRenderer>().materials)
            {
                material.color = Color.blue;
            }
        }

        ArrowPointer.ObjectPointer data = new ArrowPointer.ObjectPointer
        {
            colorOfArrow  = Color.cyan,
            colorOfText   = Color.cyan,
            extraSprite   = MoodIconHolder.MyInstance.iconSpriteRepairNoBackground,
            extraFunction = true
        };
        ArrowPointer.MyInstance.AddObjectToPointAt(gameObject, data);

        snowControl.MyParticleSystem.Play();
    }