示例#1
0
 private void OnTriggerEnter2D(Collider2D collision)
 {
     if (WorldVariables.eventos[eventNumber])
     {
         WorldVariables.eventos[eventNumber] = false;
         WorldVariables.StartDialogue(eventNumber);
     }
 }
示例#2
0
    void Start()
    {
        if (WorldVariables.firstRoomStart)
        {
            playerGO.transform.position   = new Vector3(90, -72, 0);
            WorldVariables.firstRoomStart = false;

            WorldVariables.StartDialogue(0);
        }
        else
        {
            playerGO.transform.position = new Vector3(-120, -72, 0);
            playerGO.GetComponent <PlayerState>().direction = 1;
        }
        WorldVariables.level1Position = 5;
    }
示例#3
0
 void Start()
 {
     if (WorldVariables.level1Start)
     {
         WorldVariables.StartDialogue(1);
         WorldVariables.level1Start = false;
     }
     if (WorldVariables.level1Position == 5)
     {
         playerT.position = room5Pos;
     }
     else if (WorldVariables.level1Position == 4)
     {
         playerT.position = room4Pos;
     }
     else if (WorldVariables.level1Position == 7)
     {
         playerT.position = room7Pos;
     }
     else if (WorldVariables.level1Position == 8)
     {
         playerT.position = room8Pos;
     }
     else if (WorldVariables.level1Position == 6)
     {
         playerT.position = room6Pos;
     }
     else if (WorldVariables.level1Position == 0)
     {
         playerT.position = electricity;
     }
     else if (WorldVariables.level1Position == 1)
     {
         playerT.position = stairs;
     }
 }
示例#4
0
 private void OnLevelWasLoaded(int level)
 {
     canSleep = true;
     WorldVariables.IncrementCurrentDay();
 }
示例#5
0
 // Update is called once per frame
 void Update()
 {
     day       = "Day:" + WorldVariables.GetCurrentDay();
     text.text = day;
 }