mirror of
https://github.com/ConjureETS/Labo_2_equ_2_a15.git
synced 2026-03-25 01:51:06 +00:00
Trousse est maintenant fonctionnel
elle rend 3 pv
This commit is contained in:
parent
354821e715
commit
b4cc1dc6ce
@ -14,7 +14,7 @@ GameObject:
|
|||||||
- 114: {fileID: 11431192}
|
- 114: {fileID: 11431192}
|
||||||
- 95: {fileID: 9512508}
|
- 95: {fileID: 9512508}
|
||||||
- 114: {fileID: 11482776}
|
- 114: {fileID: 11482776}
|
||||||
m_Layer: 0
|
m_Layer: 9
|
||||||
m_Name: Enemy
|
m_Name: Enemy
|
||||||
m_TagString: Enemy
|
m_TagString: Enemy
|
||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
@ -152,6 +152,10 @@ Prefab:
|
|||||||
propertyPath: maxHP
|
propertyPath: maxHP
|
||||||
value: 2
|
value: 2
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 0}
|
||||||
|
propertyPath: m_Layer
|
||||||
|
value: 9
|
||||||
|
objectReference: {fileID: 0}
|
||||||
m_RemovedComponents: []
|
m_RemovedComponents: []
|
||||||
m_ParentPrefab: {fileID: 0}
|
m_ParentPrefab: {fileID: 0}
|
||||||
m_RootGameObject: {fileID: 183722}
|
m_RootGameObject: {fileID: 183722}
|
||||||
|
|||||||
@ -10,7 +10,6 @@ GameObject:
|
|||||||
- 4: {fileID: 412680}
|
- 4: {fileID: 412680}
|
||||||
- 50: {fileID: 5021002}
|
- 50: {fileID: 5021002}
|
||||||
- 114: {fileID: 11417938}
|
- 114: {fileID: 11417938}
|
||||||
- 61: {fileID: 6160456}
|
|
||||||
- 58: {fileID: 5858278}
|
- 58: {fileID: 5858278}
|
||||||
- 212: {fileID: 21297412}
|
- 212: {fileID: 21297412}
|
||||||
m_Layer: 0
|
m_Layer: 0
|
||||||
@ -60,20 +59,7 @@ CircleCollider2D:
|
|||||||
m_UsedByEffector: 0
|
m_UsedByEffector: 0
|
||||||
m_Offset: {x: 0, y: 0}
|
m_Offset: {x: 0, y: 0}
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_Radius: 4
|
m_Radius: 2.25
|
||||||
--- !u!61 &6160456
|
|
||||||
BoxCollider2D:
|
|
||||||
m_ObjectHideFlags: 1
|
|
||||||
m_PrefabParentObject: {fileID: 0}
|
|
||||||
m_PrefabInternal: {fileID: 100100000}
|
|
||||||
m_GameObject: {fileID: 172872}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_Material: {fileID: 0}
|
|
||||||
m_IsTrigger: 0
|
|
||||||
m_UsedByEffector: 0
|
|
||||||
m_Offset: {x: 0, y: 0}
|
|
||||||
serializedVersion: 2
|
|
||||||
m_Size: {x: 3.66000009, y: 4.5999999}
|
|
||||||
--- !u!114 &11417938
|
--- !u!114 &11417938
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_ObjectHideFlags: 1
|
m_ObjectHideFlags: 1
|
||||||
@ -85,8 +71,7 @@ MonoBehaviour:
|
|||||||
m_Script: {fileID: 11500000, guid: b50c00a886c5b1a4196e8364e365416a, type: 3}
|
m_Script: {fileID: 11500000, guid: b50c00a886c5b1a4196e8364e365416a, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
bombRadius: 10
|
bombRadius: .5
|
||||||
bombForce: 100
|
|
||||||
fuseTime: 1.5
|
fuseTime: 1.5
|
||||||
explosion: {fileID: 100000, guid: 340a9e7d5164c9c4fba1dc34dc50b866, type: 2}
|
explosion: {fileID: 100000, guid: 340a9e7d5164c9c4fba1dc34dc50b866, type: 2}
|
||||||
--- !u!212 &21297412
|
--- !u!212 &21297412
|
||||||
@ -128,7 +113,15 @@ Prefab:
|
|||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 0}
|
- target: {fileID: 0}
|
||||||
propertyPath: m_Radius
|
propertyPath: m_Radius
|
||||||
value: 4
|
value: 2.25
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 0}
|
||||||
|
propertyPath: m_Enabled
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 0}
|
||||||
|
propertyPath: bombRadius
|
||||||
|
value: .5
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
m_RemovedComponents: []
|
m_RemovedComponents: []
|
||||||
m_ParentPrefab: {fileID: 0}
|
m_ParentPrefab: {fileID: 0}
|
||||||
|
|||||||
@ -924,7 +924,6 @@ MonoBehaviour:
|
|||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
audioPickup: {fileID: 8300000, guid: a48a7087d05490f4b913e6cd1d177494, type: 3}
|
audioPickup: {fileID: 8300000, guid: a48a7087d05490f4b913e6cd1d177494, type: 3}
|
||||||
health: {fileID: 1113329686}
|
|
||||||
--- !u!61 &1736051096
|
--- !u!61 &1736051096
|
||||||
BoxCollider2D:
|
BoxCollider2D:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|||||||
@ -3,9 +3,7 @@ using System.Collections;
|
|||||||
|
|
||||||
public class Bomb : MonoBehaviour
|
public class Bomb : MonoBehaviour
|
||||||
{
|
{
|
||||||
public float bombRadius = 10f; // Radius within which enemies are killed.
|
public float bombRadius = 0.5f; // Radius within which enemies are killed.
|
||||||
public float bombForce = 100f; // Force that enemies are thrown from the blast.
|
|
||||||
|
|
||||||
public float fuseTime = 1.5f;
|
public float fuseTime = 1.5f;
|
||||||
public GameObject explosion; // Prefab of explosion effect.
|
public GameObject explosion; // Prefab of explosion effect.
|
||||||
|
|
||||||
|
|||||||
@ -4,6 +4,7 @@ using UnityEngine.UI;
|
|||||||
|
|
||||||
public class CollisionCheck : MonoBehaviour {
|
public class CollisionCheck : MonoBehaviour {
|
||||||
|
|
||||||
|
//[HideInInspector]
|
||||||
public Text health;
|
public Text health;
|
||||||
|
|
||||||
|
|
||||||
@ -19,11 +20,24 @@ public class CollisionCheck : MonoBehaviour {
|
|||||||
health.text = "Health: " + gameObject.GetComponent<Health>().removeHP(1);
|
health.text = "Health: " + gameObject.GetComponent<Health>().removeHP(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(gameObject.GetComponent<Health>().getHP() == 0)
|
if(gameObject.GetComponent<Health>().getHP() == 0)
|
||||||
{
|
{
|
||||||
gameObject.GetComponent<PlayerBehavior>().Death();
|
gameObject.GetComponent<PlayerBehavior>().Death();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void OnTriggerEnter2D(Collider2D col)
|
||||||
|
{
|
||||||
|
if(col.tag == "Player")
|
||||||
|
{
|
||||||
|
|
||||||
|
health.text = "Health: " + gameObject.GetComponent<Health>().addHP(3);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,17 +9,18 @@ public class HealthPickup : MonoBehaviour
|
|||||||
public AudioClip audioPickup;
|
public AudioClip audioPickup;
|
||||||
public Text health;
|
public Text health;
|
||||||
|
|
||||||
|
|
||||||
void OnTriggerEnter2D(Collider2D other)
|
void OnTriggerEnter2D(Collider2D other)
|
||||||
{
|
{
|
||||||
if(other.tag == "Player")
|
if(other.tag == "Player")
|
||||||
{
|
{
|
||||||
AudioSource.PlayClipAtPoint(audioPickup, transform.position);
|
AudioSource.PlayClipAtPoint(audioPickup, transform.position);
|
||||||
|
health.text = "Health: " + other.gameObject.GetComponent<Health>().addHP(3);
|
||||||
|
|
||||||
|
|
||||||
// Destroy the crate.
|
// Destroy the crate.
|
||||||
Destroy(gameObject);
|
Destroy(gameObject);
|
||||||
|
|
||||||
//heal player
|
|
||||||
health.text = "Health: " + gameObject.GetComponent<Health>().addHP(3);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -5,6 +5,7 @@ public class LayBombs : MonoBehaviour
|
|||||||
{
|
{
|
||||||
[HideInInspector]
|
[HideInInspector]
|
||||||
public bool bombLaid = false; // si une bombe a été lancé
|
public bool bombLaid = false; // si une bombe a été lancé
|
||||||
|
[HideInInspector]
|
||||||
public int bombCount = 0; // nombre bomb que le joueur possede
|
public int bombCount = 0; // nombre bomb que le joueur possede
|
||||||
|
|
||||||
public GameObject bomb; // Prefab of the bomb.
|
public GameObject bomb; // Prefab of the bomb.
|
||||||
|
|||||||
@ -8,6 +8,7 @@ PlayerSettings:
|
|||||||
defaultScreenOrientation: 4
|
defaultScreenOrientation: 4
|
||||||
targetDevice: 2
|
targetDevice: 2
|
||||||
targetResolution: 0
|
targetResolution: 0
|
||||||
|
useOnDemandResources: 0
|
||||||
accelerometerFrequency: 60
|
accelerometerFrequency: 60
|
||||||
companyName: DefaultCompany
|
companyName: DefaultCompany
|
||||||
productName: Laboratoire_2_Equipe_2
|
productName: Laboratoire_2_Equipe_2
|
||||||
@ -28,6 +29,7 @@ PlayerSettings:
|
|||||||
androidShowActivityIndicatorOnLoading: -1
|
androidShowActivityIndicatorOnLoading: -1
|
||||||
iosAppInBackgroundBehavior: 0
|
iosAppInBackgroundBehavior: 0
|
||||||
displayResolutionDialog: 1
|
displayResolutionDialog: 1
|
||||||
|
iosAllowHTTPDownload: 1
|
||||||
allowedAutorotateToPortrait: 1
|
allowedAutorotateToPortrait: 1
|
||||||
allowedAutorotateToPortraitUpsideDown: 1
|
allowedAutorotateToPortraitUpsideDown: 1
|
||||||
allowedAutorotateToLandscapeRight: 1
|
allowedAutorotateToLandscapeRight: 1
|
||||||
@ -135,6 +137,15 @@ PlayerSettings:
|
|||||||
iOSLaunchScreenFillPct: 100
|
iOSLaunchScreenFillPct: 100
|
||||||
iOSLaunchScreenSize: 100
|
iOSLaunchScreenSize: 100
|
||||||
iOSLaunchScreenCustomXibPath:
|
iOSLaunchScreenCustomXibPath:
|
||||||
|
iOSLaunchScreeniPadType: 0
|
||||||
|
iOSLaunchScreeniPadImage: {fileID: 0}
|
||||||
|
iOSLaunchScreeniPadBackgroundColor:
|
||||||
|
serializedVersion: 2
|
||||||
|
rgba: 0
|
||||||
|
iOSLaunchScreeniPadFillPct: 100
|
||||||
|
iOSLaunchScreeniPadSize: 100
|
||||||
|
iOSLaunchScreeniPadCustomXibPath:
|
||||||
|
iOSDeviceRequirements: []
|
||||||
AndroidTargetDevice: 0
|
AndroidTargetDevice: 0
|
||||||
AndroidSplashScreenScale: 0
|
AndroidSplashScreenScale: 0
|
||||||
androidSplashScreen: {fileID: 0}
|
androidSplashScreen: {fileID: 0}
|
||||||
@ -224,6 +235,8 @@ PlayerSettings:
|
|||||||
ps4SdkOverride:
|
ps4SdkOverride:
|
||||||
ps4BGMPath:
|
ps4BGMPath:
|
||||||
ps4ShareFilePath:
|
ps4ShareFilePath:
|
||||||
|
ps4ShareOverlayImagePath:
|
||||||
|
ps4PrivacyGuardImagePath:
|
||||||
ps4NPtitleDatPath:
|
ps4NPtitleDatPath:
|
||||||
ps4RemotePlayKeyAssignment: -1
|
ps4RemotePlayKeyAssignment: -1
|
||||||
ps4RemotePlayKeyMappingDir:
|
ps4RemotePlayKeyMappingDir:
|
||||||
@ -245,6 +258,7 @@ PlayerSettings:
|
|||||||
ps4attribMoveSupport: 0
|
ps4attribMoveSupport: 0
|
||||||
ps4attrib3DSupport: 0
|
ps4attrib3DSupport: 0
|
||||||
ps4attribShareSupport: 0
|
ps4attribShareSupport: 0
|
||||||
|
ps4IncludedModules: []
|
||||||
monoEnv:
|
monoEnv:
|
||||||
psp2Splashimage: {fileID: 0}
|
psp2Splashimage: {fileID: 0}
|
||||||
psp2NPTrophyPackPath:
|
psp2NPTrophyPackPath:
|
||||||
|
|||||||
@ -16,7 +16,7 @@ TagManager:
|
|||||||
-
|
-
|
||||||
-
|
-
|
||||||
- Ground
|
- Ground
|
||||||
-
|
- Enemies
|
||||||
-
|
-
|
||||||
-
|
-
|
||||||
-
|
-
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user