private void Start()
 {
     if (this.Prompt.Yandere != null)
     {
         this.Yandere = this.Prompt.Yandere;
     }
 }
Exemplo n.º 2
0
 private void Start()
 {
     this.Identifier     = base.GetComponent <YanSaveIdentifier>();
     this.TrapSwing      = 12.15f;
     this.Yandere        = GameObject.Find("YandereChan").GetComponent <YandereScript>();
     this.StudentManager = this.Yandere.StudentManager;
     this.StudentManager.Doors[this.StudentManager.DoorID] = this;
     this.StudentManager.DoorID++;
     this.DoorID = this.StudentManager.DoorID;
     if (this.Identifier != null)
     {
         this.Identifier.ObjectID = "Door_" + this.DoorID;
     }
     else
     {
         Debug.Log(base.gameObject.name + " doesn't have an identifier.");
     }
     if (this.StudentManager.EastBathroomArea.bounds.Contains(base.transform.position) || this.StudentManager.WestBathroomArea.bounds.Contains(base.transform.position))
     {
         this.RoomName = "Toilet Stall";
     }
     if (this.Swinging)
     {
         this.OriginX[0] = this.Doors[0].transform.localPosition.z;
         if (this.OriginX.Length > 1)
         {
             this.OriginX[1] = this.Doors[1].transform.localPosition.z;
         }
         this.TimeLimit = 1f;
     }
     if (this.Labels.Length != 0)
     {
         this.Labels[0].text = this.RoomName;
         this.Labels[1].text = this.RoomName;
         this.UpdatePlate();
     }
     if (this.Club != ClubType.None && ClubGlobals.GetClubClosed(this.Club))
     {
         this.Prompt.Hide();
         this.Prompt.enabled = false;
         base.enabled        = false;
     }
     if (this.DisableSelf)
     {
         base.enabled = false;
     }
     this.Prompt.Student   = false;
     this.Prompt.Door      = true;
     this.DoorColliders    = new Collider[2];
     this.DoorColliders[0] = this.Doors[0].gameObject.GetComponent <BoxCollider>();
     if (this.DoorColliders[0] == null)
     {
         this.DoorColliders[0] = this.Doors[0].GetChild(0).gameObject.GetComponent <BoxCollider>();
     }
     if (this.Doors.Length > 1)
     {
         this.DoorColliders[1] = this.Doors[1].GetComponent <BoxCollider>();
     }
 }
Exemplo n.º 3
0
        public static void SetPersona(int id)
        {
            YandereScript script = UnityEngine.Object.FindObjectOfType <YandereScript>();

            if (script != null)
            {
                script.UpdatePersona(id);
            }
        }
Exemplo n.º 4
0
        public static void SetHairstyle(int id)
        {
            YandereScript script = UnityEngine.Object.FindObjectOfType <YandereScript>();

            if (script != null)
            {
                script.Hairstyle = id;
                script.UpdateHair();
            }
        }
Exemplo n.º 5
0
    // Token: 0x0600039E RID: 926 RVA: 0x00049550 File Offset: 0x00047750
    public virtual void Start()
    {
        YandereScript yandereScript = (YandereScript)GameObject.Find("YandereChan").GetComponent(typeof(YandereScript));

        Physics.IgnoreCollision(yandereScript.collider, this.MyCollider);
        if (this.transform.position.y > (float)1000)
        {
            this.transform.position = new Vector3((float)12, (float)0, (float)28);
        }
    }
Exemplo n.º 6
0
    // Token: 0x060004AE RID: 1198 RVA: 0x0003CCF0 File Offset: 0x0003B0F0
    private void Start()
    {
        YandereScript component = GameObject.Find("YandereChan").GetComponent <YandereScript>();

        Physics.IgnoreCollision(component.GetComponent <Collider>(), this.MyCollider);
        if (base.transform.position.y > 1000f)
        {
            base.transform.position = new Vector3(12f, 0f, 28f);
        }
    }
Exemplo n.º 7
0
        public static void SetAccessory(int id)
        {
            YandereScript script = GameObject.FindObjectOfType <YandereScript>();

            if (script != null)
            {
                script.AccessoryID = id;
                script.UpdateAccessory();
            }
        }
Exemplo n.º 8
0
 private void Start()
 {
     this.Water.transform.localPosition = new Vector3(this.Water.transform.localPosition.x, 0f, this.Water.transform.localPosition.z);
     this.Water.transform.localScale    = new Vector3(0.235f, 1f, 0.14f);
     this.Water.material.color          = new Color(this.Water.material.color.r, this.Water.material.color.g, this.Water.material.color.b, 0f);
     this.Blood.material.color          = new Color(this.Blood.material.color.r, this.Blood.material.color.g, this.Blood.material.color.b, 0f);
     this.Gas.transform.localPosition   = new Vector3(this.Gas.transform.localPosition.x, 0f, this.Gas.transform.localPosition.z);
     this.Gas.transform.localScale      = new Vector3(0.235f, 1f, 0.14f);
     this.Gas.material.color            = new Color(this.Gas.material.color.r, this.Gas.material.color.g, this.Gas.material.color.b, 0f);
     this.Yandere = GameObject.Find("YandereChan").GetComponent <YandereScript>();
 }
Exemplo n.º 9
0
 // Token: 0x06000A5D RID: 2653 RVA: 0x000555BC File Offset: 0x000537BC
 private void OnTriggerEnter(Collider other)
 {
     if (other.gameObject.layer == 13)
     {
         YandereScript component = other.gameObject.GetComponent <YandereScript>();
         if (component != null)
         {
             component.Bloodiness = 100f;
             UnityEngine.Object.Destroy(base.gameObject);
         }
     }
 }
Exemplo n.º 10
0
 // Token: 0x06000210 RID: 528 RVA: 0x00026AA8 File Offset: 0x00024CA8
 public virtual void OnTriggerEnter(Collider other)
 {
     if (other.gameObject.layer == 13)
     {
         YandereScript yandereScript = (YandereScript)other.gameObject.GetComponent(typeof(YandereScript));
         if (yandereScript != null)
         {
             yandereScript.Bloodiness = (float)100;
             yandereScript.UpdateBlood();
             UnityEngine.Object.Destroy(this.gameObject);
         }
     }
 }
Exemplo n.º 11
0
 private void OnTriggerEnter(Collider other)
 {
     if (base.enabled && other.gameObject.layer == 13)
     {
         this.YandereObject = other.gameObject;
         this.Yandere       = other.gameObject.GetComponent <YandereScript>();
         if (this.Yandere != null)
         {
             if (!this.Yandere.Trespassing)
             {
                 this.Yandere.NotificationManager.DisplayNotification(NotificationType.Intrude);
             }
             this.Yandere.Trespassing = true;
         }
     }
 }
Exemplo n.º 12
0
        public static void UnlockMech()
        {
            var chain = FindObjectOfType <ChainScript>();
            var tarp  = chain.Tarp;

            Destroy(chain.gameObject);
            tarp.Prompt.enabled = true;
            tarp.enabled        = true;
            tarp.Unwrap         = true;
            tarp.Prompt.Hide();
            tarp.Prompt.enabled       = false;
            tarp.Mecha.enabled        = true;
            tarp.Mecha.Prompt.enabled = true;

            YandereScript y = FindObjectOfType <YandereScript>();

            y.transform.position = chain.transform.position;
        }
 private void Start()
 {
     this.Yandere = GameObject.Find("YandereChan").GetComponent <YandereScript>();
     this.Clock   = GameObject.Find("Clock").GetComponent <ClockScript>();
     if (!this.CanCollide)
     {
         Physics.IgnoreCollision(this.Yandere.GetComponent <Collider>(), this.MyCollider);
     }
     if (this.Outline.Length != 0)
     {
         this.OriginalColor = this.Outline[0].color;
     }
     this.OriginalScale = base.transform.localScale;
     if (this.MyRigidbody == null)
     {
         this.MyRigidbody = base.GetComponent <Rigidbody>();
     }
     if (this.DisableAtStart)
     {
         base.gameObject.SetActive(false);
     }
 }
Exemplo n.º 14
0
 // Token: 0x06001391 RID: 5009 RVA: 0x000A8360 File Offset: 0x000A6560
 private void OnTriggerEnter(Collider other)
 {
     if (other.gameObject.layer == 9)
     {
         StudentScript component = other.gameObject.GetComponent <StudentScript>();
         if (component != null && !component.Electrified)
         {
             component.Yandere.GazerEyes.ElectrocuteStudent(component);
             base.gameObject.SetActive(false);
             this.PowerSwitch.On = false;
         }
     }
     if (other.gameObject.layer == 13)
     {
         YandereScript component2 = other.gameObject.GetComponent <YandereScript>();
         if (component2 != null)
         {
             component2.StudentManager.Headmaster.Taze();
             component2.StudentManager.Headmaster.Heartbroken.Headmaster = false;
         }
     }
 }
 private void Update()
 {
     if (this.Yandere == null)
     {
         if (this.Prompt.Yandere != null)
         {
             this.Yandere = this.Prompt.Yandere;
             return;
         }
     }
     else if (this.Yandere.Inventory.EmeticPoison || this.Yandere.Inventory.RatPoison || this.Yandere.Inventory.LethalPoison)
     {
         this.Prompt.enabled = true;
         if (!this.Yandere.Inventory.EmeticPoison && !this.Yandere.Inventory.RatPoison)
         {
             this.Prompt.HideButton[0] = true;
         }
         else
         {
             this.Prompt.HideButton[0] = false;
         }
         if (this.Prompt.Circle[0].fillAmount == 0f)
         {
             if (this.Yandere.Inventory.EmeticPoison)
             {
                 this.Yandere.Inventory.EmeticPoison = false;
                 this.Yandere.PoisonType             = 1;
             }
             else
             {
                 this.Yandere.Inventory.RatPoison = false;
                 this.Yandere.PoisonType          = 3;
             }
             this.Yandere.CharacterAnimation.CrossFade("f02_poisoning_00");
             this.Yandere.PoisonSpot = this.PoisonSpot;
             this.Yandere.Poisoning  = true;
             this.Yandere.CanMove    = false;
             base.enabled            = false;
             this.Poison             = 1;
             if (this.ID != 1)
             {
                 this.StudentManager.Students[this.ID].Emetic = true;
             }
             this.Prompt.Hide();
             this.Prompt.enabled = false;
         }
         if (this.ID == 11 || this.ID == 6)
         {
             this.Prompt.HideButton[1] = !this.Prompt.Yandere.Inventory.LethalPoison;
             if (this.Prompt.Circle[1].fillAmount == 0f)
             {
                 this.Prompt.Yandere.CharacterAnimation.CrossFade("f02_poisoning_00");
                 this.Prompt.Yandere.Inventory.LethalPoison   = false;
                 this.StudentManager.Students[this.ID].Lethal = true;
                 this.Prompt.Yandere.PoisonSpot = this.PoisonSpot;
                 this.Prompt.Yandere.Poisoning  = true;
                 this.Prompt.Yandere.CanMove    = false;
                 this.Prompt.Yandere.PoisonType = 2;
                 base.enabled = false;
                 this.Poison  = 2;
                 this.Prompt.Hide();
                 this.Prompt.enabled = false;
                 return;
             }
         }
     }
     else
     {
         this.Prompt.enabled = false;
     }
 }
Exemplo n.º 16
0
 private void Awake()
 {
     this.Yandere = base.GetComponent <YandereScript>();
 }
 private void Start()
 {
     this.Yandere = GameObject.Find("YandereChan").GetComponent <YandereScript>();
 }
Exemplo n.º 18
0
    private void Awake()
    {
        bool student = this.Student;

        this.MinimumDistanceSqr = this.MinimumDistance;
        this.MaximumDistanceSqr = this.MaximumDistance;
        this.DistanceSqr        = float.PositiveInfinity;
        this.OwnerType          = this.DecideOwnerType();
        if (this.RaycastTarget == null)
        {
            this.RaycastTarget = base.transform;
        }
        if (this.OffsetZ.Length == 0)
        {
            this.OffsetZ = new float[4];
        }
        if (this.Yandere == null)
        {
            this.YandereObject = GameObject.Find("YandereChan");
            if (this.YandereObject != null)
            {
                this.Yandere = this.YandereObject.GetComponent <YandereScript>();
            }
        }
        if (this.Yandere != null)
        {
            this.PauseScreen  = this.Yandere.PauseScreen;
            this.PromptParent = this.Yandere.PromptParent;
            this.UICamera     = this.Yandere.UICamera;
            this.MainCamera   = this.Yandere.MainCamera;
            if (this.Noisy)
            {
                this.Speaker = UnityEngine.Object.Instantiate <GameObject>(this.SpeakerObject, base.transform.position, Quaternion.identity).GetComponent <UISprite>();
                this.Speaker.transform.parent           = this.PromptParent.transform;
                this.Speaker.transform.localScale       = new Vector3(1f, 1f, 1f);
                this.Speaker.transform.localEulerAngles = Vector3.zero;
                this.Speaker.enabled = false;
            }
            this.Square = UnityEngine.Object.Instantiate <GameObject>(this.PromptParent.SquareObject, base.transform.position, Quaternion.identity).GetComponent <UISprite>();
            this.Square.transform.parent           = this.PromptParent.transform;
            this.Square.transform.localScale       = new Vector3(1f, 1f, 1f);
            this.Square.transform.localEulerAngles = Vector3.zero;
            Color color = this.Square.color;
            color.a             = 0f;
            this.Square.color   = color;
            this.Square.enabled = false;
            this.ID             = 0;
            while (this.ID < 4)
            {
                if (this.ButtonActive[this.ID])
                {
                    this.Button[this.ID] = UnityEngine.Object.Instantiate <GameObject>(this.ButtonObject[this.ID], base.transform.position, Quaternion.identity).GetComponent <UISprite>();
                    UISprite uisprite = this.Button[this.ID];
                    uisprite.transform.parent           = this.PromptParent.transform;
                    uisprite.transform.localScale       = new Vector3(1f, 1f, 1f);
                    uisprite.transform.localEulerAngles = Vector3.zero;
                    uisprite.color       = new Color(uisprite.color.r, uisprite.color.g, uisprite.color.b, 0f);
                    uisprite.enabled     = false;
                    this.Circle[this.ID] = UnityEngine.Object.Instantiate <GameObject>(this.CircleObject, base.transform.position, Quaternion.identity).GetComponent <UISprite>();
                    UISprite uisprite2 = this.Circle[this.ID];
                    uisprite2.transform.parent           = this.PromptParent.transform;
                    uisprite2.transform.localScale       = new Vector3(1f, 1f, 1f);
                    uisprite2.transform.localEulerAngles = Vector3.zero;
                    uisprite2.color     = new Color(uisprite2.color.r, uisprite2.color.g, uisprite2.color.b, 0f);
                    uisprite2.enabled   = false;
                    this.Label[this.ID] = UnityEngine.Object.Instantiate <GameObject>(this.LabelObject, base.transform.position, Quaternion.identity).GetComponent <UILabel>();
                    UILabel uilabel = this.Label[this.ID];
                    uilabel.transform.parent           = this.PromptParent.transform;
                    uilabel.transform.localScale       = new Vector3(1f, 1f, 1f);
                    uilabel.transform.localEulerAngles = Vector3.zero;
                    uilabel.color   = new Color(uilabel.color.r, uilabel.color.g, uilabel.color.b, 0f);
                    uilabel.enabled = false;
                    if (this.Suspicious)
                    {
                        uilabel.color = new Color(1f, 0f, 0f, 0f);
                    }
                    uilabel.text = "     " + this.Text[this.ID];
                }
                this.AcceptingInput[this.ID] = true;
                this.ID++;
            }
            this.BloodMask  = 2;
            this.BloodMask |= 4;
            this.BloodMask |= 512;
            this.BloodMask |= 8192;
            this.BloodMask |= 16384;
            this.BloodMask |= 65536;
            this.BloodMask |= 2097152;
            this.BloodMask  = ~this.BloodMask;
        }
    }
Exemplo n.º 19
0
 private void Start()
 {
     foreach (GameObject gameObject in this.Cosmetic.FemaleHair)
     {
         if (gameObject != null)
         {
             gameObject.SetActive(false);
         }
     }
     foreach (GameObject gameObject2 in this.Cosmetic.TeacherHair)
     {
         if (gameObject2 != null)
         {
             gameObject2.SetActive(false);
         }
     }
     foreach (GameObject gameObject3 in this.Cosmetic.FemaleAccessories)
     {
         if (gameObject3 != null)
         {
             gameObject3.SetActive(false);
         }
     }
     foreach (GameObject gameObject4 in this.Cosmetic.TeacherAccessories)
     {
         if (gameObject4 != null)
         {
             gameObject4.SetActive(false);
         }
     }
     foreach (GameObject gameObject5 in this.Cosmetic.ClubAccessories)
     {
         if (gameObject5 != null)
         {
             gameObject5.SetActive(false);
         }
     }
     foreach (GameObject gameObject6 in this.Cosmetic.Kerchiefs)
     {
         if (gameObject6 != null)
         {
             gameObject6.SetActive(false);
         }
     }
     foreach (GameObject gameObject7 in this.Cosmetic.CatGifts)
     {
         if (gameObject7 != null)
         {
             gameObject7.SetActive(false);
         }
     }
     this.Difficulty = MissionModeGlobals.NemesisDifficulty;
     if (this.Difficulty == 0)
     {
         this.Difficulty = 1;
     }
     this.Student.StudentManager     = GameObject.Find("StudentManager").GetComponent <StudentManagerScript>();
     this.Student.WitnessCamera      = GameObject.Find("WitnessCamera").GetComponent <WitnessCameraScript>();
     this.Student.Police             = GameObject.Find("Police").GetComponent <PoliceScript>();
     this.Student.JSON               = GameObject.Find("JSON").GetComponent <JsonScript>();
     this.Student.CharacterAnimation = this.Student.Character.GetComponent <Animation>();
     this.Student.Ragdoll.Nemesis    = true;
     this.Student.Yandere            = this.Yandere;
     this.Student.IdleAnim           = "f02_newIdle_00";
     this.Student.WalkAnim           = "f02_newWalk_00";
     this.Student.ShoeRemoval.RightCasualShoe.gameObject.SetActive(false);
     this.Student.ShoeRemoval.LeftCasualShoe.gameObject.SetActive(false);
     if (this.Difficulty < 3)
     {
         this.Student.Character.GetComponent <Animation>()["f02_nemesisEyes_00"].layer = 2;
         this.Student.Character.GetComponent <Animation>().Play("f02_nemesisEyes_00");
         this.Cosmetic.MyRenderer.sharedMesh = this.Cosmetic.FemaleUniforms[5];
         this.Cosmetic.MyRenderer.materials[0].mainTexture   = this.NemesisUniform;
         this.Cosmetic.MyRenderer.materials[1].mainTexture   = this.NemesisUniform;
         this.Cosmetic.MyRenderer.materials[2].mainTexture   = this.NemesisFace;
         this.Cosmetic.RightEyeRenderer.material.mainTexture = this.NemesisEyes;
         this.Cosmetic.LeftEyeRenderer.material.mainTexture  = this.NemesisEyes;
         this.Student.FaceCollider.tag = "Nemesis";
         this.NemesisHair.SetActive(true);
     }
     else
     {
         this.NemesisHair.SetActive(false);
         this.PutOnDisguise = true;
     }
     this.Student.LowPoly.enabled = false;
     this.Student.DisableEffects();
     this.HideObjects();
     this.ID = 0;
     while (this.ID < this.Student.Ragdoll.AllRigidbodies.Length)
     {
         this.Student.Ragdoll.AllRigidbodies[this.ID].isKinematic = true;
         this.Student.Ragdoll.AllColliders[this.ID].enabled       = false;
         this.ID++;
     }
     this.Student.Ragdoll.AllColliders[10].enabled = true;
     this.Student.Prompt.HideButton[0]             = true;
     this.Student.Prompt.HideButton[2]             = true;
     UnityEngine.Object.Destroy(this.Student.MyRigidbody);
     base.transform.position = this.MissionMode.SpawnPoints[UnityEngine.Random.Range(0, 4)].position;
     this.MissionMode.LastKnownPosition.position = new Vector3(0f, 0f, -36f);
     this.UpdateLKP();
     base.transform.parent = null;
     this.Student.Name     = "Nemesis";
     this.Aggressive       = MissionModeGlobals.NemesisAggression;
 }
Exemplo n.º 20
0
 private void Start()
 {
     this.Yandere = GameObject.Find("YandereChan").GetComponent <YandereScript>();
     this.HeadCollider.enabled = false;
     this.UpdateBlood();
 }
Exemplo n.º 21
0
 public static void PrintInfo()
 {
     YandereScript yandere = GameObject.FindObjectOfType <YandereScript>();
 }