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

Modif script changement de couleur des objets en fonction des tâches

parent 23c9c362
No related branches found
No related tags found
No related merge requests found
fileFormatVersion: 2
guid: 2d49d884ff905af41a441fc53504d108
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Assets/Couleur/Blanc.PNG

410 B

fileFormatVersion: 2
guid: 095b15ed22634174ebbd31ac65c15f02
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:
Assets/Couleur/Marron.PNG

13 KiB

fileFormatVersion: 2
guid: f86e5e5a6eb1f634fb4b683ef90b877c
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:
File moved
File moved
......@@ -9240,6 +9240,7 @@ MonoBehaviour:
reanimerMamie: {fileID: 1450391183}
foodMamie: {fileID: 1988139551}
rouge: {fileID: 2800000, guid: 7debf8cc81f18fd40ba1d28f9b182271, type: 3}
blanc: {fileID: 2800000, guid: 095b15ed22634174ebbd31ac65c15f02, type: 3}
healthBar: {fileID: 1103176265}
--- !u!1001 &1248610504
PrefabInstance:
......@@ -16801,6 +16802,7 @@ MonoBehaviour:
textNourriture: {fileID: 1527800214}
textReanimation: {fileID: 386774413}
healthBar: {fileID: 1103176265}
blanc: {fileID: 2800000, guid: 095b15ed22634174ebbd31ac65c15f02, type: 3}
--- !u!4 &2134402357 stripped
Transform:
m_CorrespondingSourceObject: {fileID: -4216859302048453862, guid: 46cfc0f959f2d7248bee5e26603ad320,
......
......@@ -20,18 +20,20 @@ public class IsOnContactMamie : MonoBehaviour
public HealthBar_1 healthBar;
public Texture blanc;
public void OnTriggerStay(Collider other)
{
if (other.gameObject.name == "Syringe_Mamie")
{
chronoPiqure += Time.deltaTime;
gameObject.GetComponent<MeshRenderer>().material.color = Color.yellow;
if (chronoPiqure >= 5.0f)
if (chronoPiqure >= 5.0f & chronoPiqure <= 6.0f)
{
textPiqure.enabled = false;
healthBar.Heal(100);
gameObject.GetComponent<MeshRenderer>().material.color = Color.green;
gameObject.GetComponent<Renderer>().material.mainTexture = blanc;
}
}
if (other.gameObject.name == "Perfusion_Mamie")
......
......@@ -23,6 +23,9 @@ public class ScreenP1Controller : MonoBehaviour
public GameObject foodMamie;
public Texture rouge;
public Texture blanc;
public Texture marron;
public HealthBar_1 healthBar;
......@@ -32,21 +35,24 @@ public class ScreenP1Controller : MonoBehaviour
{
textPiqure.enabled = true;
healthBar.Heal(75);
while (textPiqure.enabled == true || textPerfusion.enabled == false)
{
syringeMamie.GetComponent<Renderer>().material.mainTexture = rouge;
mamie.GetComponent<Renderer>().material.mainTexture = rouge;
}
}
if(textPiqure.enabled == false)
{
syringeMamie.GetComponent<Renderer>().material.mainTexture = blanc;
}
if (chrono > 50.0f & chrono < 51.0f & textPiqure.enabled == true)
{
textPiqure.enabled = false;
textPerfusion.enabled = true;
perfusionMamie.GetComponent<Renderer>().material.mainTexture = rouge;
healthBar.Heal(50);
}
if (textPerfusion.enabled == false)
{
perfusionMamie.GetComponent<Renderer>().material.mainTexture = blanc;
}
if (chrono > 88.0f & chrono < 89.0f & textPerfusion.enabled == true)
......@@ -54,9 +60,14 @@ public class ScreenP1Controller : MonoBehaviour
textPerfusion.enabled = false;
textReanimation.enabled = true;
reanimerMamie.GetComponent<Renderer>().material.mainTexture = rouge;
healthBar.Heal(25);
}
if (textPerfusion.enabled == false)
{
reanimerMamie.GetComponent<Renderer>().material.mainTexture = marron;
}
if (chrono > 120.0f & textReanimation.enabled == true)
{
......@@ -69,32 +80,38 @@ public class ScreenP1Controller : MonoBehaviour
//Deuxième série de tâches
if (200.0f < chrono & chrono < 201.0f)
{
mamie.GetComponent<MeshRenderer>().material.color = Color.red;
textNourriture.enabled = true;
healthBar.TakeDamage(25);
healthBar.Heal(75);
}
if (380.0f < chrono & chrono < 381.0f)
{
mamie.GetComponent<MeshRenderer>().material.color = Color.red;
textNourriture.enabled = false;
textPiqure.enabled = true;
healthBar.TakeDamage(25);
syringeMamie.GetComponent<Renderer>().material.mainTexture = rouge;
healthBar.Heal(50);
}
if (textPiqure.enabled == false)
{
syringeMamie.GetComponent<Renderer>().material.mainTexture = blanc;
}
if (chrono > 420.0f & chrono < 421.0f & textPiqure.enabled == true)
{
//diminuer jauge de vie
textPiqure.enabled = false;
textPerfusion.enabled = true;
healthBar.TakeDamage(25);
perfusionMamie.GetComponent<Renderer>().material.mainTexture = rouge;
healthBar.Heal(25);
}
if (textPerfusion.enabled == false)
{
perfusionMamie.GetComponent<Renderer>().material.mainTexture = blanc;
}
if (chrono > 458.0f & textPerfusion.enabled == true)
{
healthBar.TakeDamage(25);
healthBar.Heal(0);
//mort du patient
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment