Skip to content
Snippets Groups Projects
Commit 5ad3576c authored by Juliette Marx's avatar Juliette Marx
Browse files

couleur + bar de vie

parent 81f2af5a
No related branches found
No related tags found
No related merge requests found
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Rouge 1
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 2800000, guid: 7debf8cc81f18fd40ba1d28f9b182271, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
fileFormatVersion: 2
guid: 1b311c39052a22641aee8d5d8ab4fe85
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Rouge
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
fileFormatVersion: 2
guid: 76afae9ba7c9b53448de974e673b1901
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:
......@@ -9,13 +9,12 @@ Material:
m_PrefabAsset: {fileID: 0}
m_Name: Syringe_Mat_Transparent
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords: _ALPHAPREMULTIPLY_ON
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 3000
stringTagMap:
RenderType: Transparent
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
......@@ -60,19 +59,19 @@ Material:
- _BumpScale: 1
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 10
- _DstBlend: 0
- _GlossMapScale: 1
- _Glossiness: 0.747
- _GlossyReflections: 1
- _Metallic: 0
- _Mode: 3
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 0.3647059}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
Assets/Rouge.PNG

22.7 KiB

fileFormatVersion: 2
guid: 7debf8cc81f18fd40ba1d28f9b182271
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 10
mipmaps:
mipMapMode: 0
enableMipMap: 1
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: -1
mipBias: -100
wrapU: -1
wrapV: -1
wrapW: -1
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:
This diff is collapsed.
......@@ -21,7 +21,7 @@ void Start ()
// Inflige des dégâts
public void TakeDamage(int damages)
{
hp -= damages;
hp = hp - damages;
UpdateHealth();
}
// Soigne le joueur
......
......@@ -18,6 +18,7 @@ public class IsOnContactMamie : MonoBehaviour
public Text textNourriture;
public Text textReanimation;
public HealthBar_1 healthBar;
public void OnTriggerStay(Collider other)
......@@ -29,7 +30,7 @@ public class IsOnContactMamie : MonoBehaviour
if (chronoPiqure >= 5.0f)
{
textPiqure.enabled = false;
//augmenter jauge de vie
healthBar.Heal(100);
gameObject.GetComponent<MeshRenderer>().material.color = Color.green;
}
}
......@@ -40,7 +41,7 @@ public class IsOnContactMamie : MonoBehaviour
if (chronoPerfusion >= 5.0f)
{
textPerfusion.enabled = false;
//augmenter jauge de vie
healthBar.Heal(100);
gameObject.GetComponent<MeshRenderer>().material.color = Color.green;
}
}
......@@ -51,7 +52,7 @@ public class IsOnContactMamie : MonoBehaviour
if (chronoNourriture >= 5.0f)
{
textNourriture.enabled = false;
//augmenter jauge de vie
healthBar.Heal(100);
gameObject.GetComponent<MeshRenderer>().material.color = Color.green;
}
}
......@@ -62,7 +63,7 @@ public class IsOnContactMamie : MonoBehaviour
if (chronoReanimation >= 5.0f)
{
textReanimation.enabled = false;
//augmenter jauge de vie
healthBar.Heal(100);
gameObject.GetComponent<MeshRenderer>().material.color = Color.green;
}
}
......
......@@ -22,35 +22,40 @@ public class ScreenP1Controller : MonoBehaviour
public GameObject reanimerMamie;
public GameObject foodMamie;
public Texture rouge;
public HealthBar_1 healthBar;
public void UpdateTasksToDo()
{
if(10.0f < chrono & chrono < 11.0f)
{
mamie.GetComponent<Renderer>().material.color = Color.red;
syringeMamie.GetComponent<Renderer>().material.color = Color.red;
syringeMamie.GetComponent<Renderer>().material.mainTexture = rouge;
mamie.GetComponent<Renderer>().material.mainTexture = rouge;
textPiqure.enabled = true;
healthBar.Heal(75);
}
if (chrono > 50.0f & chrono < 51.0f & textPiqure.enabled == true)
{
//diminuer jauge de vie
textPiqure.enabled = false;
textPerfusion.enabled = true;
healthBar.Heal(50);
}
if (chrono > 88.0f & chrono < 89.0f & textPerfusion.enabled == true)
{
//diminuer jauge de vie
textPerfusion.enabled = false;
textReanimation.enabled = true;
healthBar.Heal(25);
}
if (chrono > 120.0f & textReanimation.enabled == true)
{
healthBar.Heal(0);
//mort du patient
}
......@@ -61,6 +66,7 @@ public class ScreenP1Controller : MonoBehaviour
{
mamie.GetComponent<MeshRenderer>().material.color = Color.red;
textNourriture.enabled = true;
healthBar.TakeDamage(25);
}
......@@ -69,6 +75,7 @@ public class ScreenP1Controller : MonoBehaviour
mamie.GetComponent<MeshRenderer>().material.color = Color.red;
textNourriture.enabled = false;
textPiqure.enabled = true;
healthBar.TakeDamage(25);
}
......@@ -77,10 +84,12 @@ public class ScreenP1Controller : MonoBehaviour
//diminuer jauge de vie
textPiqure.enabled = false;
textPerfusion.enabled = true;
healthBar.TakeDamage(25);
}
if (chrono > 458.0f & textPerfusion.enabled == true)
{
healthBar.TakeDamage(25);
//mort du patient
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment