-
Notifications
You must be signed in to change notification settings - Fork 0
/
GetMissionDescription.cs
46 lines (41 loc) · 1.37 KB
/
GetMissionDescription.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using TMPro;
public class GetMissionDescription : MonoBehaviour //attaches to StartUI to get the mission description
{
private GameManager gameMgr;
public TextMeshProUGUI descriptionText;
private void Awake()
{
gameMgr = GameObject.Find("Persistent Object").GetComponent<GameManager>();
}
private void Start()
{
string missionName = gameMgr.missionName;
if (missionName == "Defend")
{
descriptionText.text = "Stop the enemy from destroying our structure";
}
else if (missionName == "Protect")
{
descriptionText.text = "Allied bots are deployed in the area, protect them and destroy all enemies";
}
else if (missionName == "Destroy")
{
descriptionText.text = "Destroy the enemy structure in the area";
}
else if (missionName == "Assault")
{
descriptionText.text = "Take over an enemy held area";
}
else if (missionName == "Hack")
{
descriptionText.text = "Hack into the enemy terminal to gather data";
}
else if (missionName == "Kill")
{
descriptionText.text = "Destroy all enemy bots in the area";
}
}
}