Recently, in the "Baldi's Basics full game public demo",
i found leftover code from a field trip that is from the 7th status update on kickstarter
7th status update:Baldi's Basics in Education and Learning - Full game! by Micah McGonigal — Kickstarter
the leftovers aren't many there's textures and coding
textures:Tree-sharedassets3.assets-245,Bus-sharedassets3.assets-303
as for the code:
// Token: 0x06000295 RID: 661 RVA: 0x00015AB0 File Offset: 0x00013CB0
public void LoadFieldTrip(FieldTripObject trip, TripEntrance entrance)
{
this.previousTimeScale = Time.timeScale;
Time.timeScale = 0f;
this.playerLocations.Clear();
this.ec.PauseEvents(true);
this.currentTripEntrance = entrance;
for (int i = 0; i < Singleton<CoreGameManager>.Instance.setPlayers; i++)
{
this.playerLocations.Add(Singleton<CoreGameManager>.Instance.GetPlayer(i).transform.position);
}
this.tripScreen = UnityEngine.Object.Instantiate<Canvas>(this.tripScreenPre);
this.tripScreen.worldCamera = Singleton<GlobalCam>.Instance.Cam;
this.ec.StoreTimeScale();
this.ec.AllTimeScale = 0f;
MainGameManager.currentManager = this;
SceneManager.LoadSceneAsync(trip.scene, LoadSceneMode.Additive);
}
// Token: 0x06000296 RID: 662 RVA: 0x00015B7C File Offset: 0x00013D7C
public void EndFieldTrip(int rank, FieldTripObject trip)
{
Time.timeScale = 0f;
this.tripResult = UnityEngine.Object.Instantiate<TripResultsScreen>(this.tripResultPre);
this.tripResult.canvas.worldCamera = Singleton<GlobalCam>.Instance.Cam;
this.tripResult.text.text = "You are a camping dude! You win these items! WOWOWOOWOWOWOWOW!!!!";
for (int i = 0; i < rank; i++)
{
this.tripResult.star[i].sprite = this.tripResult.starOn;
}
List<ItemObject> list = new List<ItemObject>();
switch (rank)
{
case 1:
if (this.tripItems.Count > 0)
{
this.tripResult.items[1].sprite = this.tripItems[0].itemSprite;
this.tripResult.items[1].gameObject.SetActive(true);
list.Add(this.tripItems[0]);
}
break;
case 2:
{
int num = 0;
while (num < this.tripResult.items.Length && num < this.tripItems.Count)
{
this.tripResult.items[num].sprite = this.tripItems[num].itemSprite;
this.tripResult.items[num].gameObject.SetActive(true);
num++;
}
list = this.tripItems;
break;
}
case 3:
{
Debug.Log(string.Concat(new object[]
{
"tripResult.items.Length = ",
this.tripResult.items.Length,
" tripItems.Count = ",
this.tripItems.Count
}));
int num2 = 0;
while (num2 < this.tripResult.items.Length && num2 < this.tripItems.Count)
{
Debug.Log("i = " + num2);
this.tripResult.items[num2].sprite = this.tripItems[num2].itemSprite;
this.tripResult.items[num2].gameObject.SetActive(true);
num2++;
}
list = this.tripItems;
break;
}
}
if (this.tripItems.Count <= 0)
{
Debug.LogWarning("An item was supposed to be awarded, but tripItems is empty!");
}
this.currentTripEntrance.SpawnItems(list);
base.StartCoroutine(this.EndFieldTripDelay(trip));
}
// Token: 0x06000297 RID: 663 RVA: 0x00015DE4 File Offset: 0x00013FE4
public void CloseFieldTrip(FieldTripObject trip)
{
UnityEngine.Object.Destroy(this.tripResult);
SceneManager.SetActiveScene(SceneManager.GetSceneByName(this.currentScene));
SceneManager.UnloadSceneAsync(trip.scene);
this.ec.RestoreTimeScale();
for (int i = 0; i < Singleton<CoreGameManager>.Instance.setPlayers; i++)
{
Singleton<CoreGameManager>.Instance.GetPlayer(i).plm.height = 5f;
Singleton<CoreGameManager>.Instance.GetPlayer(i).transform.position = this.playerLocations[i];
}
this.ec.AssignPlayers();
this.ec.PauseEvents(false);
Time.timeScale = this.previousTimeScale;
}
the challenge is to add back the field tripSo yeah! Good Luck!
Did you like this post? Tell us
Leave a comment
Log in with your itch.io account to leave a comment.