@@ -0,0 +1,146 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: BoutMaterial
m_Shader: {fileID: 200, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords:
m_LightmapFlags: 5
m_CustomRenderQueue: 3000
stringTagMap: {}
m_SavedProperties:
serializedVersion: 2
m_TexEnvs:
data:
first:
name: _MainTex
second:
m_Texture: {fileID: 2800000, guid: ca7cc574cafee9a44a4971926d741d40, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _BumpMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _DetailNormalMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _ParallaxMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _OcclusionMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _EmissionMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _DetailMask
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _DetailAlbedoMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _MetallicGlossMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
data:
first:
name: _SrcBlend
second: 1
data:
first:
name: _DstBlend
second: 0
data:
first:
name: _Cutoff
second: 0.5
data:
first:
name: _Parallax
second: 0.02
data:
first:
name: _ZWrite
second: 1
data:
first:
name: _Glossiness
second: 0.5
data:
first:
name: _BumpScale
second: 1
data:
first:
name: _OcclusionStrength
second: 1
data:
first:
name: _DetailNormalMapScale
second: 1
data:
first:
name: _UVSec
second: 0
data:
first:
name: _Mode
second: 0
data:
first:
name: _Metallic
second: 0
data:
first:
name: _InvFade
second: 1
m_Colors:
data:
first:
name: _EmissionColor
second: {r: 0, g: 0, b: 0, a: 1}
data:
first:
name: _Color
second: {r: 1, g: 1, b: 1, a: 1}
data:
first:
name: _TintColor
second: {r: 0.5, g: 0.5, b: 0.5, a: 0.5}

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

@@ -0,0 +1,57 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &129454
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 4
m_Component:
- 4: {fileID: 402648}
- 114: {fileID: 11429620}
m_Layer: 0
m_Name: GameManager
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &402648
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 129454}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0.85744274, y: 0.109915495, z: 6.742485}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
--- !u!114 &11429620
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 129454}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ed28105318d5117488658bb9e00831a1, type: 3}
m_Name:
m_EditorClassIdentifier:
zonesOnShip:
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
--- !u!1001 &100100000
Prefab:
m_ObjectHideFlags: 1
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications: []
m_RemovedComponents: []
m_ParentPrefab: {fileID: 0}
m_RootGameObject: {fileID: 129454}
m_IsPrefabParent: 1

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

@@ -11,7 +11,7 @@ GameObject:
- 33: {fileID: 3369796}
- 65: {fileID: 6530988}
- 114: {fileID: 11495024}
m_Layer: 0
m_Layer: 9
m_Name: ScrTriggerL
m_TagString: Untagged
m_Icon: {fileID: 0}
@@ -27,7 +27,7 @@ GameObject:
m_Component:
- 4: {fileID: 466078}
- 212: {fileID: 21299120}
m_Layer: 16
m_Layer: 9
m_Name: background
m_TagString: Untagged
m_Icon: {fileID: 0}
@@ -42,7 +42,7 @@ GameObject:
serializedVersion: 4
m_Component:
- 4: {fileID: 444900}
m_Layer: 0
m_Layer: 9
m_Name: SpaceL
m_TagString: Untagged
m_Icon: {fileID: 0}
@@ -58,7 +58,7 @@ GameObject:
m_Component:
- 4: {fileID: 475160}
- 212: {fileID: 21232938}
m_Layer: 17
m_Layer: 9
m_Name: midground
m_TagString: Untagged
m_Icon: {fileID: 0}
@@ -72,7 +72,7 @@ Transform:
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 155612}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 30, z: 0}
m_LocalPosition: {x: 0, y: 39, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 498086}
@@ -207,7 +207,7 @@ SpriteRenderer:
m_SortingLayerID: 0
m_SortingOrder: -1
m_Sprite: {fileID: 21300000, guid: f70349eb1666df9428c6e3eeedc0a38a, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_Color: {r: 0.77205884, g: 0.77205884, b: 0.77205884, a: 1}
m_FlipX: 0
m_FlipY: 0
--- !u!1001 &100100000
@@ -216,7 +216,11 @@ Prefab:
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications: []
m_Modifications:
- target: {fileID: 0}
propertyPath: m_Layer
value: 9
objectReference: {fileID: 0}
m_RemovedComponents: []
m_ParentPrefab: {fileID: 0}
m_RootGameObject: {fileID: 155612}
@@ -9,7 +9,7 @@ GameObject:
m_Component:
- 4: {fileID: 435188}
- 212: {fileID: 21220066}
m_Layer: 16
m_Layer: 9
m_Name: background
m_TagString: Untagged
m_Icon: {fileID: 0}
@@ -24,7 +24,7 @@ GameObject:
serializedVersion: 4
m_Component:
- 4: {fileID: 423930}
m_Layer: 0
m_Layer: 9
m_Name: SpaceR
m_TagString: Untagged
m_Icon: {fileID: 0}
@@ -42,7 +42,7 @@ GameObject:
- 33: {fileID: 3347064}
- 65: {fileID: 6557062}
- 114: {fileID: 11494442}
m_Layer: 0
m_Layer: 9
m_Name: ScrTriggerR
m_TagString: MainCamera
m_Icon: {fileID: 0}
@@ -58,7 +58,7 @@ GameObject:
m_Component:
- 4: {fileID: 482942}
- 212: {fileID: 21267802}
m_Layer: 17
m_Layer: 9
m_Name: midground
m_TagString: Untagged
m_Icon: {fileID: 0}
@@ -72,7 +72,7 @@ Transform:
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 130052}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 16, y: 30, z: 0}
m_LocalPosition: {x: 16, y: 39, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 485170}
@@ -177,7 +177,7 @@ SpriteRenderer:
m_SortingLayerID: 0
m_SortingOrder: -1
m_Sprite: {fileID: 21300000, guid: f70349eb1666df9428c6e3eeedc0a38a, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_Color: {r: 0.77254903, g: 0.77254903, b: 0.77254903, a: 1}
m_FlipX: 0
m_FlipY: 0
--- !u!212 &21267802
@@ -216,7 +216,11 @@ Prefab:
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications: []
m_Modifications:
- target: {fileID: 0}
propertyPath: m_Layer
value: 9
objectReference: {fileID: 0}
m_RemovedComponents: []
m_ParentPrefab: {fileID: 0}
m_RootGameObject: {fileID: 130052}

Large diffs are not rendered by default.

@@ -7,6 +7,7 @@ public class AsteroidBurstForce : MonoBehaviour {

[Header("Variables")]
public float initialForce = 1.0f;
public float initialRotationForce = 1.0f;
public Vector3 target;

// Use this for initialization
@@ -18,5 +19,6 @@ public class AsteroidBurstForce : MonoBehaviour {
direction.Normalize();

body.AddForce(direction * initialForce);
body.AddTorque(initialRotationForce);
}
}
@@ -0,0 +1,23 @@
using UnityEngine;
using System.Collections;

public class AsteroidController : MonoBehaviour {

public GameObject explosionPrefab;

// Use this for initialization
void Start () {

}

// Update is called once per frame
void Update () {

}

public void Explode()
{
Instantiate(explosionPrefab, transform.position, Quaternion.identity);
Destroy(gameObject);
}
}
@@ -1,10 +1,11 @@
using UnityEngine;
using System.Collections;
using System.Collections.Generic;

public class AteroidGenerator : MonoBehaviour {

[Header("Variables")]
public GameObject asteroidPrefab;
public List<GameObject> asteroidPrefab;
public float asteroidPopInterval;

[Header("Zone d'apparition")]
@@ -19,6 +20,8 @@ public class AteroidGenerator : MonoBehaviour {
[Header("Force des astéroïdes")]
public float minForce = 0;
public float maxForce;
public float minRotationForce;
public float maxRotationForce;

private float nextTime;

@@ -42,7 +45,7 @@ public class AteroidGenerator : MonoBehaviour {
randomPos.z = 7.5f;

// Instantiate asteroid
GameObject asteroid = (GameObject)GameObject.Instantiate(asteroidPrefab, randomPos, Quaternion.identity);
GameObject asteroid = (GameObject)GameObject.Instantiate(asteroidPrefab[Random.Range(0, asteroidPrefab.Count)], randomPos, Quaternion.identity);
AsteroidBurstForce burst = asteroid.GetComponent<AsteroidBurstForce>();

// Random destination
@@ -56,6 +59,7 @@ public class AteroidGenerator : MonoBehaviour {
// Initial burst
burst.target = randomTarget;
burst.initialForce = Random.Range(minForce, maxForce);
burst.initialRotationForce = Random.Range(minRotationForce, maxRotationForce);

// Set up autodestroy asteroid
AsteroidAutoDestroy ad = asteroid.GetComponent<AsteroidAutoDestroy>();
@@ -32,6 +32,7 @@ public void OnCollisionEnter2D(Collision2D collision)
if (collision.gameObject.tag == "Asteroid")
{
PlayerController.Get.ps.RogerTracte();
collision.gameObject.GetComponent<AsteroidController>().Explode();
}
}
}
@@ -32,6 +32,7 @@ public enum ZONEVAISSEAU {
}

public Dictionary<ZONEVAISSEAU, GameObject> availableZones;
[Header("Cockpit, nez, bas, arrière")]
public List<GameObject> zonesOnShip;

private ZONEVAISSEAU lastActivatedZone;
@@ -0,0 +1,25 @@
using UnityEngine;
using System.Collections;

public class ParticleSystemAutoDestroy : MonoBehaviour {

private ParticleSystem ps;
public float lifeTime;

public void Start()
{
Destroy(gameObject, lifeTime);
ps = GetComponent<ParticleSystem>();
}

public void Update()
{
if (ps)
{
if (!ps.IsAlive())
{
Destroy(gameObject);
}
}
}
}
@@ -81,7 +81,7 @@ public void OnCollisionEnter2D(Collision2D collision)
{
if (collision.gameObject.tag == "Asteroid")
{
GameObject.Destroy(collision.gameObject);
collision.gameObject.GetComponent<AsteroidController>().Explode();
ps.ImpactAsteroidSound();
TakeDamage();
}
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN -389 KB (80%) Assets/Sprites/background.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -12,4 +12,4 @@ PhysicsManager:
m_SolverIterationCount: 6
m_QueriesHitTriggers: 1
m_EnableAdaptiveForce: 0
m_LayerCollisionMatrix: fffefffffffefffffffefffffffffffffffefffffffeffffffffffffffffffffc8ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
@@ -5,13 +5,5 @@ EditorBuildSettings:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Scenes:
- enabled: 0
path: Assets/Scenes/testSceneAug.unity
- enabled: 0
path: Assets/Scenes/mainMenu.unity
- enabled: 0
path: Assets/Scenes/testScene.unity
- enabled: 0
path: Assets/Scenes/testSceneN.unity
- enabled: 1
path: Assets/Scenes/testALL_Titouan.unity
@@ -16,7 +16,7 @@ TagManager:
-
-
- Cat
-
- Parallax
-
-
-