Making some changes for v1.1
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:20576e4a4bd25da903b68f2044b2804ed8950e63a65601f21c867b744fb8170e
|
||||
size 54904456
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9d2dc65077ee37e499754680d6cd37c4
|
||||
timeCreated: 1523363911
|
||||
guid: 76d90bec02087ee4a85a9c574aec2831
|
||||
timeCreated: 1523568639
|
||||
licenseType: Free
|
||||
AudioImporter:
|
||||
externalObjects: {}
|
||||
Generated
+10
-1
@@ -19,8 +19,8 @@ GameObject:
|
||||
serializedVersion: 5
|
||||
m_Component:
|
||||
- component: {fileID: 4910612253286244}
|
||||
- component: {fileID: 114508120021180596}
|
||||
- component: {fileID: 82296697716139720}
|
||||
- component: {fileID: 114508120021180596}
|
||||
m_Layer: 0
|
||||
m_Name: MonsterSpawner
|
||||
m_TagString: Untagged
|
||||
@@ -133,5 +133,14 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
monsterPrefab: {fileID: 0}
|
||||
monsterPrefab2: {fileID: 0}
|
||||
monsterPrefab3: {fileID: 0}
|
||||
monsterPrefab4: {fileID: 0}
|
||||
twigOne: {fileID: 8300000, guid: a6733a38ded6d734c95864ed96cb77f7, type: 3}
|
||||
twigTwo: {fileID: 8300000, guid: 4b32f873dc6db214998cb461007ca1e3, type: 3}
|
||||
twigThree: {fileID: 8300000, guid: 3fd4efba0204a56448fe9430bf530db1, type: 3}
|
||||
water: {fileID: 8300000, guid: ac24fd5439963184bb234aa526abcfc9, type: 3}
|
||||
waterSoundOnly: 0
|
||||
motion: {x: 0, y: 0}
|
||||
delay: 5
|
||||
lifespan: 4
|
||||
|
||||
Generated
+81
@@ -593,6 +593,7 @@ GameObject:
|
||||
m_Component:
|
||||
- component: {fileID: 1850700147}
|
||||
- component: {fileID: 1850700146}
|
||||
- component: {fileID: 1850700148}
|
||||
m_Layer: 0
|
||||
m_Name: GameOverController
|
||||
m_TagString: Untagged
|
||||
@@ -628,6 +629,86 @@ Transform:
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!82 &1850700148
|
||||
AudioSource:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1850700145}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 4
|
||||
OutputAudioMixerGroup: {fileID: 0}
|
||||
m_audioClip: {fileID: 8300000, guid: 76d90bec02087ee4a85a9c574aec2831, type: 3}
|
||||
m_PlayOnAwake: 1
|
||||
m_Volume: 1
|
||||
m_Pitch: 1
|
||||
Loop: 1
|
||||
Mute: 0
|
||||
Spatialize: 0
|
||||
SpatializePostEffects: 0
|
||||
Priority: 128
|
||||
DopplerLevel: 1
|
||||
MinDistance: 1
|
||||
MaxDistance: 500
|
||||
Pan2D: 0
|
||||
rolloffMode: 0
|
||||
BypassEffects: 0
|
||||
BypassListenerEffects: 0
|
||||
BypassReverbZones: 0
|
||||
rolloffCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 2
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
- serializedVersion: 2
|
||||
time: 1
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
panLevelCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 2
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 0
|
||||
spreadCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 2
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
reverbZoneMixCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 2
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 0
|
||||
--- !u!1 &2135767184
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
Generated
+23
-3
@@ -493,6 +493,11 @@ Prefab:
|
||||
- target: {fileID: 114508120021180596, guid: b16589ec086fe774ba4170ead0d42374,
|
||||
type: 2}
|
||||
propertyPath: motion.y
|
||||
value: 2
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 114508120021180596, guid: b16589ec086fe774ba4170ead0d42374,
|
||||
type: 2}
|
||||
propertyPath: lifespan
|
||||
value: 4
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
@@ -836,7 +841,7 @@ Prefab:
|
||||
- target: {fileID: 114508120021180596, guid: b16589ec086fe774ba4170ead0d42374,
|
||||
type: 2}
|
||||
propertyPath: motion.x
|
||||
value: 2
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 114508120021180596, guid: b16589ec086fe774ba4170ead0d42374,
|
||||
type: 2}
|
||||
@@ -852,8 +857,18 @@ Prefab:
|
||||
- target: {fileID: 114508120021180596, guid: b16589ec086fe774ba4170ead0d42374,
|
||||
type: 2}
|
||||
propertyPath: motion.y
|
||||
value: 0.5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 114508120021180596, guid: b16589ec086fe774ba4170ead0d42374,
|
||||
type: 2}
|
||||
propertyPath: waterSoundOnly
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 114508120021180596, guid: b16589ec086fe774ba4170ead0d42374,
|
||||
type: 2}
|
||||
propertyPath: lifespan
|
||||
value: 8
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_ParentPrefab: {fileID: 100100000, guid: b16589ec086fe774ba4170ead0d42374, type: 2}
|
||||
m_IsPrefabParent: 0
|
||||
@@ -905,7 +920,7 @@ Prefab:
|
||||
- target: {fileID: 114508120021180596, guid: b16589ec086fe774ba4170ead0d42374,
|
||||
type: 2}
|
||||
propertyPath: motion.x
|
||||
value: 5
|
||||
value: 2.5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 114508120021180596, guid: b16589ec086fe774ba4170ead0d42374,
|
||||
type: 2}
|
||||
@@ -1402,7 +1417,7 @@ Prefab:
|
||||
- target: {fileID: 114508120021180596, guid: b16589ec086fe774ba4170ead0d42374,
|
||||
type: 2}
|
||||
propertyPath: motion.x
|
||||
value: -5
|
||||
value: -2.5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 114508120021180596, guid: b16589ec086fe774ba4170ead0d42374,
|
||||
type: 2}
|
||||
@@ -1433,6 +1448,11 @@ Prefab:
|
||||
value:
|
||||
objectReference: {fileID: 1876593924556066, guid: a3a482c56d8487d4182da0e0cb895726,
|
||||
type: 2}
|
||||
- target: {fileID: 114508120021180596, guid: b16589ec086fe774ba4170ead0d42374,
|
||||
type: 2}
|
||||
propertyPath: lifespan
|
||||
value: 8
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_ParentPrefab: {fileID: 100100000, guid: b16589ec086fe774ba4170ead0d42374, type: 2}
|
||||
m_IsPrefabParent: 0
|
||||
|
||||
@@ -87,6 +87,7 @@ public class GameOverController : MonoBehaviour {
|
||||
|
||||
IEnumerator OpeningCoroutine() {
|
||||
yield return new WaitForSeconds (0.75f);
|
||||
background.GetComponent<Animator> ().Play ("ending_opening", 0, 1f);
|
||||
background.GetComponent<Animator> ().speed = 0;
|
||||
JumpLeft ();
|
||||
page++;
|
||||
|
||||
@@ -4,14 +4,18 @@ using UnityEngine;
|
||||
|
||||
public class Monster : MonoBehaviour {
|
||||
public int value;
|
||||
public float lifespan {
|
||||
set {
|
||||
//hackfix
|
||||
StartCoroutine (ReverseDirectionAfter (value / 2));
|
||||
StartCoroutine (DestroySelfAfter (value));
|
||||
}
|
||||
}
|
||||
|
||||
Rigidbody2D rigidBody;
|
||||
|
||||
void Awake() {
|
||||
rigidBody = GetComponent<Rigidbody2D> ();
|
||||
|
||||
StartCoroutine (ReverseDirectionAfter (2f));
|
||||
StartCoroutine (DestroySelfAfter (4f));
|
||||
}
|
||||
|
||||
void OnMouseOver() {
|
||||
|
||||
@@ -2,13 +2,23 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
using Random = UnityEngine.Random;
|
||||
|
||||
public class MonsterSpawner : MonoBehaviour {
|
||||
public GameObject monsterPrefab;
|
||||
public GameObject monsterPrefab2;
|
||||
public GameObject monsterPrefab3;
|
||||
public GameObject monsterPrefab4;
|
||||
|
||||
public AudioClip twigOne;
|
||||
public AudioClip twigTwo;
|
||||
public AudioClip twigThree;
|
||||
public AudioClip water;
|
||||
public bool waterSoundOnly = false;
|
||||
|
||||
public Vector2 motion;
|
||||
public float delay;
|
||||
public float lifespan;
|
||||
|
||||
AudioSource audioSource;
|
||||
|
||||
@@ -34,26 +44,53 @@ public class MonsterSpawner : MonoBehaviour {
|
||||
GameObject monster = Instantiate (monsterPrefab);
|
||||
monster.transform.position = transform.position;
|
||||
monster.GetComponent<Rigidbody2D> ().velocity = motion;
|
||||
audioSource.Play ();
|
||||
monster.GetComponent<Monster> ().lifespan = lifespan;
|
||||
PlaySound ();
|
||||
|
||||
//ugly duplication
|
||||
yield return new WaitForSeconds (delay);
|
||||
monster = Instantiate (monsterPrefab2);
|
||||
monster.transform.position = transform.position;
|
||||
monster.GetComponent<Rigidbody2D> ().velocity = motion;
|
||||
audioSource.Play ();
|
||||
monster.GetComponent<Monster> ().lifespan = lifespan;
|
||||
PlaySound ();
|
||||
|
||||
yield return new WaitForSeconds (delay);
|
||||
monster = Instantiate (monsterPrefab3);
|
||||
monster.transform.position = transform.position;
|
||||
monster.GetComponent<Rigidbody2D> ().velocity = motion;
|
||||
audioSource.Play ();
|
||||
monster.GetComponent<Monster> ().lifespan = lifespan;
|
||||
PlaySound ();
|
||||
|
||||
yield return new WaitForSeconds (delay);
|
||||
monster = Instantiate (monsterPrefab4);
|
||||
monster.transform.position = transform.position;
|
||||
monster.GetComponent<Rigidbody2D> ().velocity = motion;
|
||||
audioSource.Play ();
|
||||
monster.GetComponent<Monster> ().lifespan = lifespan;
|
||||
PlaySound ();
|
||||
}
|
||||
}
|
||||
|
||||
void PlaySound() {
|
||||
AudioClip audioClip = new AudioClip();
|
||||
|
||||
if (waterSoundOnly) {
|
||||
audioClip = water;
|
||||
} else {
|
||||
int choice = Random.Range (0, 3);
|
||||
switch(choice) {
|
||||
case 0:
|
||||
audioClip = twigOne;
|
||||
break;
|
||||
case 1:
|
||||
audioClip = twigTwo;
|
||||
break;
|
||||
case 2:
|
||||
audioClip = twigThree;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
audioSource.PlayOneShot (audioClip, 0.3f);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:75dc3bae91eb931b922db93c547f638af251659388ca412bc3740e54c17d2f29
|
||||
size 194738
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:505eb50929b071af0fe93cc8b1b27e732b8a9c693d90b7cf694b1e91b4ded92c
|
||||
size 203368
|
||||
Generated
+24
@@ -0,0 +1,24 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a6733a38ded6d734c95864ed96cb77f7
|
||||
timeCreated: 1523568929
|
||||
licenseType: Free
|
||||
AudioImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 6
|
||||
defaultSettings:
|
||||
loadType: 0
|
||||
sampleRateSetting: 0
|
||||
sampleRateOverride: 44100
|
||||
compressionFormat: 1
|
||||
quality: 1
|
||||
conversionMode: 0
|
||||
platformSettingOverrides: {}
|
||||
forceToMono: 0
|
||||
normalize: 1
|
||||
preloadAudioData: 1
|
||||
loadInBackground: 0
|
||||
ambisonic: 0
|
||||
3D: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:e65c9fe4a054fec4fdb752d4f84b5754a711b630c7cb32eaccc522b0dedf2253
|
||||
size 141422
|
||||
Generated
+24
@@ -0,0 +1,24 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4b32f873dc6db214998cb461007ca1e3
|
||||
timeCreated: 1523568928
|
||||
licenseType: Free
|
||||
AudioImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 6
|
||||
defaultSettings:
|
||||
loadType: 0
|
||||
sampleRateSetting: 0
|
||||
sampleRateOverride: 44100
|
||||
compressionFormat: 1
|
||||
quality: 1
|
||||
conversionMode: 0
|
||||
platformSettingOverrides: {}
|
||||
forceToMono: 0
|
||||
normalize: 1
|
||||
preloadAudioData: 1
|
||||
loadInBackground: 0
|
||||
ambisonic: 0
|
||||
3D: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:0ff2bf7bdf6e7c57f8b7a04dccd31a8fc96553ee90be1b522d1d271e5d6425ab
|
||||
size 1253440
|
||||
Generated
+24
@@ -0,0 +1,24 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3fd4efba0204a56448fe9430bf530db1
|
||||
timeCreated: 1523568928
|
||||
licenseType: Free
|
||||
AudioImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 6
|
||||
defaultSettings:
|
||||
loadType: 0
|
||||
sampleRateSetting: 0
|
||||
sampleRateOverride: 44100
|
||||
compressionFormat: 1
|
||||
quality: 1
|
||||
conversionMode: 0
|
||||
platformSettingOverrides: {}
|
||||
forceToMono: 0
|
||||
normalize: 1
|
||||
preloadAudioData: 1
|
||||
loadInBackground: 0
|
||||
ambisonic: 0
|
||||
3D: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:0b14f3ddd60d6cc2ec0f6be4aa87e53c00a3677633d5d32fd56b47b550d6cdd0
|
||||
size 1845144
|
||||
Generated
+24
@@ -0,0 +1,24 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ac24fd5439963184bb234aa526abcfc9
|
||||
timeCreated: 1523568929
|
||||
licenseType: Free
|
||||
AudioImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 6
|
||||
defaultSettings:
|
||||
loadType: 0
|
||||
sampleRateSetting: 0
|
||||
sampleRateOverride: 44100
|
||||
compressionFormat: 1
|
||||
quality: 1
|
||||
conversionMode: 0
|
||||
platformSettingOverrides: {}
|
||||
forceToMono: 0
|
||||
normalize: 1
|
||||
preloadAudioData: 1
|
||||
loadInBackground: 0
|
||||
ambisonic: 0
|
||||
3D: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user