Merge branch 'master' of https://git.steelants.cz/PragueGameJam/GlobalGameJame
This commit is contained in:
commit
0c6ef2fd1f
Binary file not shown.
157
Assets/Prefabs/PillsObject.prefab
Normal file
157
Assets/Prefabs/PillsObject.prefab
Normal file
@ -0,0 +1,157 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &3435627263884782620
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 3435627263884782622}
|
||||
- component: {fileID: 3435627263884782623}
|
||||
- component: {fileID: 3435627263884782617}
|
||||
m_Layer: 0
|
||||
m_Name: PillsObject
|
||||
m_TagString: Interact
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &3435627263884782622
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3435627263884782620}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0.008133344, y: 1.265739, z: -2.023658}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 8352172027178710535}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &3435627263884782623
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3435627263884782620}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: a26079dbac7f3cd4bacb95972241b8cb, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
blockType: 6
|
||||
health: 30
|
||||
healthRate: 15
|
||||
amountModels: []
|
||||
pills: {fileID: 5022562433003553812}
|
||||
prefabPills: {fileID: 8423879596285337014, guid: d946f9dd565b97e49919fc8bd91aae4e,
|
||||
type: 3}
|
||||
spawnPillsPoint: {x: 0.008133344, y: 1.265739, z: -2.023658}
|
||||
audioSource: {fileID: 0}
|
||||
doorSound: {fileID: 0}
|
||||
--- !u!65 &3435627263884782617
|
||||
BoxCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3435627263884782620}
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_Size: {x: 0.2, y: 0.4, z: 0.2}
|
||||
m_Center: {x: 0, y: 0.15, z: 0}
|
||||
--- !u!1001 &3554492602056808866
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 3435627263884782622}
|
||||
m_Modifications:
|
||||
- target: {fileID: 4808991200749645733, guid: d946f9dd565b97e49919fc8bd91aae4e,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4808991200749645733, guid: d946f9dd565b97e49919fc8bd91aae4e,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4808991200749645733, guid: d946f9dd565b97e49919fc8bd91aae4e,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4808991200749645733, guid: d946f9dd565b97e49919fc8bd91aae4e,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: -0.7071068
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4808991200749645733, guid: d946f9dd565b97e49919fc8bd91aae4e,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4808991200749645733, guid: d946f9dd565b97e49919fc8bd91aae4e,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4808991200749645733, guid: d946f9dd565b97e49919fc8bd91aae4e,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 0.7071068
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4808991200749645733, guid: d946f9dd565b97e49919fc8bd91aae4e,
|
||||
type: 3}
|
||||
propertyPath: m_RootOrder
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4808991200749645733, guid: d946f9dd565b97e49919fc8bd91aae4e,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: -90
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4808991200749645733, guid: d946f9dd565b97e49919fc8bd91aae4e,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4808991200749645733, guid: d946f9dd565b97e49919fc8bd91aae4e,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7843994914498914666, guid: d946f9dd565b97e49919fc8bd91aae4e,
|
||||
type: 3}
|
||||
propertyPath: m_Materials.Array.data[0]
|
||||
value:
|
||||
objectReference: {fileID: 2100000, guid: 362f55bd6cc53b74dbd4f875ded5b5f1, type: 2}
|
||||
- target: {fileID: 8423879596285337014, guid: d946f9dd565b97e49919fc8bd91aae4e,
|
||||
type: 3}
|
||||
propertyPath: m_Name
|
||||
value: painkillers
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents:
|
||||
- {fileID: 5689278253577398147, guid: d946f9dd565b97e49919fc8bd91aae4e, type: 3}
|
||||
m_SourcePrefab: {fileID: 100100000, guid: d946f9dd565b97e49919fc8bd91aae4e, type: 3}
|
||||
--- !u!1 &5022562433003553812 stripped
|
||||
GameObject:
|
||||
m_CorrespondingSourceObject: {fileID: 8423879596285337014, guid: d946f9dd565b97e49919fc8bd91aae4e,
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 3554492602056808866}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!4 &8352172027178710535 stripped
|
||||
Transform:
|
||||
m_CorrespondingSourceObject: {fileID: 4808991200749645733, guid: d946f9dd565b97e49919fc8bd91aae4e,
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 3554492602056808866}
|
||||
m_PrefabAsset: {fileID: 0}
|
7
Assets/Prefabs/PillsObject.prefab.meta
Normal file
7
Assets/Prefabs/PillsObject.prefab.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 51b65bc1216f2c4469761bc1039bfce1
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -44,7 +44,7 @@ AudioSource:
|
||||
OutputAudioMixerGroup: {fileID: 0}
|
||||
m_audioClip: {fileID: 0}
|
||||
m_PlayOnAwake: 1
|
||||
m_Volume: 1
|
||||
m_Volume: 0.05
|
||||
m_Pitch: 1
|
||||
Loop: 0
|
||||
Mute: 0
|
||||
@ -141,8 +141,8 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
musicSource: {fileID: 5981860502065413816}
|
||||
DayMusic: {fileID: 0}
|
||||
NightMusic: {fileID: 0}
|
||||
DayMusic: {fileID: 8300000, guid: dbd637c87d6302e47b3dc18075b6de89, type: 3}
|
||||
NightMusic: {fileID: 8300000, guid: 2565765545848aa4daee89afd5ea506b, type: 3}
|
||||
Sun: {fileID: 0}
|
||||
--- !u!1 &7985979212931499537
|
||||
GameObject:
|
||||
@ -192,10 +192,10 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 885220d038aa1a6468127c63dd90a926, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
speed: 10
|
||||
runSpeed: 25
|
||||
speed: 5
|
||||
runSpeed: 10
|
||||
rotateSpeed: 5
|
||||
mouseSensitive: 200
|
||||
mouseSensitive: 50
|
||||
buildRate: 0.5
|
||||
health: 100
|
||||
actualHealth: 100
|
||||
@ -204,11 +204,14 @@ MonoBehaviour:
|
||||
weaponList:
|
||||
- {fileID: 2179056336067526865, guid: 666835f3de085f9409e62598a45208bf, type: 3}
|
||||
- {fileID: 2587956328074680696, guid: 4ce5febc0b514174abbed9882322d1ed, type: 3}
|
||||
- {fileID: 7279375804173823597, guid: f7f441e621e5e5f40b11b7617756a0af, type: 3}
|
||||
spikes: {fileID: 1999182813209888360, guid: 7933df0606f61e94e9008c58a313b22c, type: 3}
|
||||
spikesImage: {fileID: 21300000, guid: 4962f21e920045b47be23a8e53f5716b, type: 3}
|
||||
handImage: {fileID: 21300000, guid: 53484c385de7af24a87aa73334775b28, type: 3}
|
||||
guiManager: {fileID: 0}
|
||||
selectedWeapon: 0
|
||||
audio: {fileID: 532783939}
|
||||
lose: {fileID: 8300000, guid: 82c454fc5bd3770438a50747eec0fc06, type: 3}
|
||||
--- !u!136 &7985979212931499551
|
||||
CapsuleCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -251,7 +254,7 @@ AudioSource:
|
||||
OutputAudioMixerGroup: {fileID: 0}
|
||||
m_audioClip: {fileID: 0}
|
||||
m_PlayOnAwake: 1
|
||||
m_Volume: 1
|
||||
m_Volume: 0.5
|
||||
m_Pitch: 1
|
||||
Loop: 0
|
||||
Mute: 0
|
||||
|
@ -51,8 +51,9 @@ MonoBehaviour:
|
||||
spawnShoot: {fileID: 4234349944776735638}
|
||||
particleShoot: {fileID: 9220017394946394338, guid: 6480cbf8d57433a49b5d77875ceb391c,
|
||||
type: 3}
|
||||
damage: 8
|
||||
damage: 15
|
||||
fireRate: 0.5
|
||||
ammoCost: 2
|
||||
animator: {fileID: 0}
|
||||
player: {fileID: 0}
|
||||
hit: 0
|
||||
@ -79,7 +80,7 @@ AudioSource:
|
||||
SpatializePostEffects: 0
|
||||
Priority: 128
|
||||
DopplerLevel: 1
|
||||
MinDistance: 1
|
||||
MinDistance: 1.705212
|
||||
MaxDistance: 500
|
||||
Pan2D: 0
|
||||
rolloffMode: 0
|
||||
|
@ -66,11 +66,12 @@ MonoBehaviour:
|
||||
particleShoot: {fileID: 0}
|
||||
damage: 50
|
||||
fireRate: 0.1
|
||||
ammoCost: 2
|
||||
animator: {fileID: 562605605}
|
||||
player: {fileID: 0}
|
||||
hit: 0
|
||||
audioSource: {fileID: 0}
|
||||
shootSound: {fileID: 0}
|
||||
shootSound: []
|
||||
--- !u!1 &2587956328074680696
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -119,13 +120,14 @@ MonoBehaviour:
|
||||
weaponRange: 2
|
||||
spawnShoot: {fileID: 0}
|
||||
particleShoot: {fileID: 0}
|
||||
damage: 25
|
||||
damage: 50
|
||||
fireRate: 0.1
|
||||
ammoCost: 2
|
||||
animator: {fileID: 562605605}
|
||||
player: {fileID: 0}
|
||||
hit: 0
|
||||
audioSource: {fileID: 0}
|
||||
shootSound: {fileID: 0}
|
||||
shootSound: []
|
||||
--- !u!1001 &8629712593250585003
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -203,7 +203,7 @@ AudioSource:
|
||||
SpatializePostEffects: 0
|
||||
Priority: 128
|
||||
DopplerLevel: 1
|
||||
MinDistance: 1
|
||||
MinDistance: 2.4825754
|
||||
MaxDistance: 500
|
||||
Pan2D: 0
|
||||
rolloffMode: 0
|
||||
|
@ -253,6 +253,9 @@ MonoBehaviour:
|
||||
- {fileID: 8452048823607473439}
|
||||
- {fileID: 5205200862043998919}
|
||||
- {fileID: 4443642083919416725}
|
||||
pills: {fileID: 0}
|
||||
prefabPills: {fileID: 0}
|
||||
spawnPillsPoint: {x: 0, y: 0, z: 0}
|
||||
audioSource: {fileID: 0}
|
||||
doorSound: {fileID: 0}
|
||||
--- !u!65 &8296172667468284673
|
||||
|
@ -5568,6 +5568,8 @@ GameObject:
|
||||
m_Component:
|
||||
- component: {fileID: 5775934073915093630}
|
||||
- component: {fileID: 1536441875377869462}
|
||||
- component: {fileID: 1210041720}
|
||||
- component: {fileID: 1210041719}
|
||||
m_Layer: 0
|
||||
m_Name: camp_fire
|
||||
m_TagString: Untagged
|
||||
@ -5618,8 +5620,43 @@ MonoBehaviour:
|
||||
health: 100
|
||||
healthRate: 5
|
||||
amountModels: []
|
||||
pills: {fileID: 0}
|
||||
prefabPills: {fileID: 0}
|
||||
spawnPillsPoint: {x: 0, y: 0, z: 0}
|
||||
audioSource: {fileID: 0}
|
||||
doorSound: {fileID: 0}
|
||||
--- !u!208 &1210041720
|
||||
NavMeshObstacle:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7382354890369941613}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_Shape: 0
|
||||
m_Extents: {x: 5.5, y: 2.5, z: 5.5}
|
||||
m_MoveThreshold: 0.1
|
||||
m_Carve: 0
|
||||
m_CarveOnlyStationary: 1
|
||||
m_Center: {x: 1, y: 0, z: 0}
|
||||
m_TimeToStationary: 0.5
|
||||
--- !u!114 &1210041719
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7382354890369941613}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: b0314a14d6c40f643bdaaf2fb3e0228d, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
parentParticle: {fileID: 1536441875314504533}
|
||||
activeInDay: 0
|
||||
activeInNight: 1
|
||||
dayManager: {fileID: 0}
|
||||
--- !u!1 &7816027402426589345
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -787,6 +787,7 @@ MonoBehaviour:
|
||||
Wood: {fileID: 863154880}
|
||||
Ammo: {fileID: 802293425}
|
||||
healthBar: {fileID: 562374831}
|
||||
waves: {fileID: 0}
|
||||
--- !u!1001 &591872493
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -39,9 +39,9 @@ public class BarricadeManager : MonoBehaviour
|
||||
|
||||
public void addPlank()
|
||||
{
|
||||
if (health < (barricadePlanks.Count * 35)) {
|
||||
if (health < (barricadePlanks.Count * 20)) {
|
||||
audioSource.PlayOneShot(buildSound);
|
||||
health += 35;
|
||||
health += 20;
|
||||
offMeshLink.enabled = false;
|
||||
}
|
||||
}
|
||||
@ -59,7 +59,7 @@ public class BarricadeManager : MonoBehaviour
|
||||
{
|
||||
for (int i = 0; i < barricadePlanks.Count; i++)
|
||||
{
|
||||
if (i < (health / 35)) {
|
||||
if (i < (health / 20)) {
|
||||
barricadePlanks[i].SetActive(true);
|
||||
}
|
||||
else
|
||||
|
@ -10,6 +10,7 @@ public class DayManager : MonoBehaviour
|
||||
public AudioSource mainSource = new AudioSource();
|
||||
public AudioClip dayClip;
|
||||
public AudioClip nigtClip;
|
||||
public GuiManager guiManager;
|
||||
|
||||
public int daySurvived = 0;
|
||||
|
||||
@ -22,6 +23,10 @@ public class DayManager : MonoBehaviour
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
if (guiManager != null)
|
||||
{
|
||||
guiManager.setWave(daySurvived+1);
|
||||
}
|
||||
float sunRotationX = transform.localEulerAngles.x;
|
||||
sunRotationX = (sunRotationX > 180) ? sunRotationX - 360 : sunRotationX;
|
||||
if (sunRotationX < 0 && !night)
|
||||
|
@ -9,6 +9,7 @@ public class GuiManager : MonoBehaviour
|
||||
public Text Wood;
|
||||
public Text Ammo;
|
||||
public Image healthBar;
|
||||
public Text waves;
|
||||
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
@ -35,4 +36,9 @@ public class GuiManager : MonoBehaviour
|
||||
{
|
||||
healthBar.fillAmount = health;
|
||||
}
|
||||
|
||||
public void setWave(int wave)
|
||||
{
|
||||
waves.text = "Wave: " + wave;
|
||||
}
|
||||
}
|
||||
|
@ -28,6 +28,10 @@ public class PlayerManager : MonoBehaviour
|
||||
public int selectedWeapon = 0;
|
||||
private float selectRate = 1;
|
||||
private float selectTime = 1;
|
||||
public AudioSource audio;
|
||||
public AudioClip lose;
|
||||
private float nextMapeTime = 3;
|
||||
private float nextMapeTime2 = 3;
|
||||
|
||||
|
||||
// Start is called before the first frame update
|
||||
@ -58,7 +62,20 @@ public class PlayerManager : MonoBehaviour
|
||||
|
||||
if (actualHealth <= 0)
|
||||
{
|
||||
SceneManager.LoadScene(SceneManager.GetActiveScene().name, LoadSceneMode.Single);
|
||||
if (audio != null && lose != null && (nextMapeTime2 + 1) <= Time.time)
|
||||
{
|
||||
playerCamera.transform.parent = null;
|
||||
rigidBody.freezeRotation = true;
|
||||
speed = 0;
|
||||
runSpeed = 0;
|
||||
audio.Stop();
|
||||
audio.volume = 0.5f;
|
||||
audio.PlayOneShot(lose);
|
||||
nextMapeTime2 = nextMapeTime + Time.time;
|
||||
}
|
||||
if (nextMapeTime2 <= Time.time) {
|
||||
SceneManager.LoadScene(SceneManager.GetActiveScene().name, LoadSceneMode.Single);
|
||||
}
|
||||
}
|
||||
|
||||
float hpInPrcent = (actualHealth / (health / 100.0f));
|
||||
|
Loading…
Reference in New Issue
Block a user