Skip to content

Commit

Permalink
Backup before webgl
Browse files Browse the repository at this point in the history
  • Loading branch information
Johanna Laitila committed Oct 19, 2019
1 parent 0de3627 commit 5ecf8e1
Show file tree
Hide file tree
Showing 45 changed files with 444 additions and 3,300 deletions.
23 changes: 23 additions & 0 deletions UEFSim2020/Assets/SampleScenes/Scenes/LaitosScene.unity
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,14 @@ PrefabInstance:
propertyPath: m_Name
value: Radio
objectReference: {fileID: 0}
- target: {fileID: 100004, guid: 8edaa647e457ca744921cf4ffa52376d, type: 3}
propertyPath: m_Layer
value: 8
objectReference: {fileID: 0}
- target: {fileID: 100004, guid: 8edaa647e457ca744921cf4ffa52376d, type: 3}
propertyPath: m_TagString
value: Radio
objectReference: {fileID: 0}
- target: {fileID: 400004, guid: 8edaa647e457ca744921cf4ffa52376d, type: 3}
propertyPath: m_LocalPosition.x
value: -13.78
Expand Down Expand Up @@ -1312,6 +1320,9 @@ MonoBehaviour:
OluttaSound: {fileID: 8300000, guid: fb822acb87672ed4c8437abd62416a28, type: 3}
BottleSound: {fileID: 8300000, guid: 85c5b3ee3bfc2be44b41af31ead5d98c, type: 3}
VendSound: {fileID: 8300000, guid: 093e5dd460525fd4a91a91f2e8bb6e66, type: 3}
Value4Life: {fileID: 8300000, guid: 407c1a61b1e5b2c4a88ca1e7c840f9d1, type: 3}
UefBiisi: {fileID: 8300000, guid: 560fa117d46257548a65cdb1b9e68239, type: 3}
ZynBiisi: {fileID: 8300000, guid: 0e4c4343eab306a4fb5614a630ae20d0, type: 3}
Promillet: 0
OluttaImage: {fileID: 1307466693}
Radio: {fileID: 1527554704}
Expand Down Expand Up @@ -10829,6 +10840,18 @@ Rigidbody:
m_Interpolate: 0
m_Constraints: 0
m_CollisionDetection: 0
--- !u!114 &1527554709
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1527554704}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 352f590725255944c91db62f22e80789, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1001 &1527867197
PrefabInstance:
m_ObjectHideFlags: 0
Expand Down
51 changes: 44 additions & 7 deletions UEFSim2020/Assets/Scripts/ControllerScript.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class ControllerScript : MonoBehaviour
public bool RakkausElama, ZynZyn;
public Text TukiKuukaudetText, NopatText, RahatText, VapaaAikaText, OlutText, NalkaText, KofeiiniText, MotivaatioText, PsykoosiText, RakkausElamaText;
public GameObject PopupImage, RigidBodyFPSController, GameOverImage;
public AudioClip ShotgunSound, EatSound, DiceSound, GameSound, StomachSound, VomitSound, VictorySound, OluttaSound, BottleSound, VendSound;
public AudioClip ShotgunSound, EatSound, DiceSound, GameSound, StomachSound, VomitSound, VictorySound, OluttaSound, BottleSound, VendSound, Value4Life, UefBiisi, ZynBiisi;
public float Promillet = 0.0f;
public Image OluttaImage;
public GameObject Radio;
Expand All @@ -28,7 +28,6 @@ public class ControllerScript : MonoBehaviour
private float dayTimer = 0.0f;
private float monthTime = 6.0f;
private float monthTimer = 0.0f;
private float timerBeforeNextPopupAllowed = 0.0f;

public static bool popupActive = false;
private RigidbodyFirstPersonController fpsController;
Expand Down Expand Up @@ -148,16 +147,47 @@ void updateUIText()
}

#region PlayerActions
public void ChangeRadio()
{
Radio.GetComponent<AudioSource>().Stop();

if(Radio.GetComponent<AudioSource>().clip == ZynBiisi)
{
Radio.GetComponent<AudioSource>().clip = UefBiisi;
}
else if (Radio.GetComponent<AudioSource>().clip == UefBiisi)
{
Radio.GetComponent<AudioSource>().clip = Value4Life;
}
else {
Radio.GetComponent<AudioSource>().clip = ZynBiisi;
}

Radio.GetComponent<AudioSource>().Play();
}

public void Study()
{
PlaySound(DiceSound);

int rand = Random.Range(1, 12);
int rand = Random.Range(1, 6);
if (rand != 4)
IncreaseDice();
else
{
ShowPopup("Et päässyt kurssia läpi!\n\nPaina Enter vittuuntuaksesi.");
IncreasePsychosis();

int randS = Random.Range(1, 7);
if (randS == 1) ShowPopup("Et päässyt kurssia läpi, koska olit liian darrassa tentissä!\n\nPaina Enter vittuuntuaksesi.");
else if (randS == 2) ShowPopup("Et päässyt kurssia läpi, koska olet liian tyhmä!\n\nPaina Enter vittuuntuaksesi.");
else if (randS == 3) ShowPopup("Et päässyt kurssia läpi, koska et ole professorin suosikkilistalla.\n\nPaina Enter masentuaksesi.");
else if (randS == 4) ShowPopup("Et päässyt kurssia läpi, koska vietit liikaa aikaa Jolenessa.\n\nPaina Enter masentuaksesi.");
else if (randS == 5) ShowPopup("Et päässyt kurssia läpi, koska x-tehtävät menivät tunteisiin.\n\nPaina Enter masentuaksesi.");
else if (randS == 6) ShowPopup("Et päässyt kurssia läpi, koska ICT-opintopolun opetus ei vastaa tentissä vaadittua osaamista.\n\nPaina Enter masentuaksesi.");
else if (randS == 7) ShowPopup("Et päässyt kurssia läpi, koska professorin kissat söivät läksysi.\n\nPaina Enter masentuaksesi.");



}

DecreaseMotivation();
Expand Down Expand Up @@ -223,6 +253,12 @@ public void Drink()
RakkausElama = true;
virgin = false;
}
else if (rand == 2)
{
ShowPopup("Törmäsit suosikkiprofessoriisi ollessasi Jolenessa.\n\nPaina Enter vastaanottaaksesi ylimääräisiä noppia vapaa-ajan aktiivisuudesta.");
IncreaseDice();
IncreaseDice();
}
}
else RakkausElama = false;
}
Expand Down Expand Up @@ -339,17 +375,18 @@ private void DecreaseMoney(int value)
{
Rahat = 0;
//if (popupActive) return;
int randNumber = Random.Range(1, 10);
int randNumber = Random.Range(1, 20);
popupActive = true;

// Random events from money running out
if (randNumber == 7)
{
ShowPopup("Rahat loppuivat!\nHaluatko myydä munuaisen ja saada 5000€?\n1) Kyllä 2) Ei");
ShowPopup("Rahat loppuivat!\n\nPaina Enter myydäksesi munuaisen.");
Rahat += 5000;
}
else
{
ShowPopup("Hups! Rahat loppuivat. Loppukuu nuudeleita!\n1) OK");
ShowPopup("Hups! Rahat loppuivat.\n\nPaina Enter syödäksesi loppukuun nuudeleita ilman tonnikalaa.");
}
popupMonth = TukiKuukaudet;
}
Expand Down
8 changes: 8 additions & 0 deletions UEFSim2020/Assets/Scripts/InteractWithObjects.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ void Update()
case "Bottle":
ItemImage.text = "Palauta pullo kauppaan";
break;

case "Radio":
ItemImage.text = "Vaihda radiokanavaa";
break;
}
}
}
Expand Down Expand Up @@ -92,6 +96,10 @@ void Update()
CtrlScript.Vending();
break;

case "Radio":
CtrlScript.ChangeRadio();
break;

case "Bottle":
CtrlScript.Bottle();
Debug.Log(hitInfo.transform.gameObject);
Expand Down
Binary file added UEFSim2020/Assets/Sounds/uefbiisi.mp3
Binary file not shown.
22 changes: 22 additions & 0 deletions UEFSim2020/Assets/Sounds/uefbiisi.mp3.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added UEFSim2020/Assets/Sounds/value4lief.mp3
Binary file not shown.
22 changes: 22 additions & 0 deletions UEFSim2020/Assets/Sounds/value4lief.mp3.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 5ecf8e1

Please sign in to comment.