Commit fb74a2c7 authored by Mitchie Maluschnig's avatar Mitchie Maluschnig
Browse files

random song will be played from tent when the player walks near (song randomly chosen at start)

parent 0797bc3b
......@@ -63,23 +63,6 @@ GameObject:
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &1232486959068676
GameObject:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 6
m_Component:
- component: {fileID: 224897134811953066}
- component: {fileID: 222152718266836164}
- component: {fileID: 114369037744403530}
m_Layer: 5
m_Name: PrimarySpeech
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &1297585788650952
GameObject:
m_ObjectHideFlags: 1
......@@ -122,7 +105,6 @@ GameObject:
m_Component:
- component: {fileID: 4967593859512098}
- component: {fileID: 20141266176392738}
- component: {fileID: 81779262949043148}
- component: {fileID: 114609290062385056}
m_Layer: 0
m_Name: FaceCam
......@@ -288,13 +270,6 @@ BoxCollider2D:
serializedVersion: 2
m_Size: {x: 4, y: 2.57}
m_EdgeRadius: 0
--- !u!81 &81779262949043148
AudioListener:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1516274406560312}
m_Enabled: 1
--- !u!114 &114094690266867812
MonoBehaviour:
m_ObjectHideFlags: 1
......@@ -382,39 +357,6 @@ MonoBehaviour:
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
--- !u!114 &114369037744403530
MonoBehaviour:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1232486959068676}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.01886791, g: 0.01886791, b: 0.01886791, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 30
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 10
m_MaxSize: 40
m_Alignment: 7
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: Didnt want to admire my glorious beard?
--- !u!114 &114430094776694032
MonoBehaviour:
m_ObjectHideFlags: 1
......@@ -427,6 +369,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
character: {fileID: 1297585788650952}
isCamera: 0
--- !u!114 &114609290062385056
MonoBehaviour:
m_ObjectHideFlags: 1
......@@ -439,6 +382,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
character: {fileID: 1201578362876714}
isCamera: 1
--- !u!114 &114787342697137634
MonoBehaviour:
m_ObjectHideFlags: 1
......@@ -451,9 +395,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
interactButton: {fileID: 114816900526660398}
speechBox: {fileID: 114369037744403530}
secondarySpeechBox: {fileID: 114151550790006464}
playerbutton1: {fileID: 0}
faceCam: {fileID: 20141266176392738}
--- !u!114 &114808308278263708
MonoBehaviour:
......@@ -607,13 +549,6 @@ SpriteRenderer:
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
m_SpriteSortPoint: 0
--- !u!222 &222152718266836164
CanvasRenderer:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1232486959068676}
m_CullTransparentMesh: 0
--- !u!222 &222176497958174252
CanvasRenderer:
m_ObjectHideFlags: 1
......@@ -685,7 +620,6 @@ RectTransform:
m_LocalScale: {x: 0.01, y: 0.01, z: 1}
m_Children:
- {fileID: 224018282793070894}
- {fileID: 224897134811953066}
- {fileID: 224511774531789040}
m_Father: {fileID: 4885089913599246}
m_RootOrder: 1
......@@ -706,7 +640,7 @@ RectTransform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 224304718089781694}
m_RootOrder: 2
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
......@@ -731,21 +665,3 @@ RectTransform:
m_AnchoredPosition: {x: 0, y: -21.7}
m_SizeDelta: {x: 126, y: 19.5}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!224 &224897134811953066
RectTransform:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1232486959068676}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 224304718089781694}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 5}
m_SizeDelta: {x: 300, y: 300}
m_Pivot: {x: 0.5, y: 0.5}
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PlayRandomTune : MonoBehaviour {
public AudioClip[] songs;
private AudioSource source;
private bool active;
// Use this for initialization
void Start () {
source = GetComponent<AudioSource>();
source.clip = songs[Random.Range(0, songs.Length)];
source.Play();
}
// Update is called once per frame
void Update () {
//doesnt work, might have to use distance to player instead
//if(source.volume > 0) {
// if (!active) {
// source.clip = songs[Random.Range(0, songs.Length)];
// active = true;
// }
// } else {
// active = false;
// }
}
}
fileFormatVersion: 2
guid: bad20358d7d0cec49929153a1da4dc1e
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
......@@ -6,6 +6,7 @@ using UnityEngine.UI;
public class TentInteractoins : MonoBehaviour {
public Button interactButton;
public GameObject particleSystem;
private GameObject player;
private BoxCollider2D thisCollider;
......@@ -48,10 +49,12 @@ public class TentInteractoins : MonoBehaviour {
void EnterInteractable() {
interactButton.gameObject.SetActive(true);
particleSystem.SetActive(true);
}
void ExitInteractable() {
interactButton.gameObject.SetActive(false);
particleSystem.SetActive(false);
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment