diff --git a/DreamInvasion/Assembly-CSharp-Editor.csproj b/DreamInvasion/Assembly-CSharp-Editor.csproj index bbc7db7..82810a5 100644 --- a/DreamInvasion/Assembly-CSharp-Editor.csproj +++ b/DreamInvasion/Assembly-CSharp-Editor.csproj @@ -19,7 +19,7 @@ full false Temp\bin\Debug\ - DEBUG;TRACE;UNITY_5_2_2;UNITY_5_2;UNITY_5;ENABLE_NEW_BUGREPORTER;ENABLE_2D_PHYSICS;ENABLE_4_6_FEATURES;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_FRAME_DEBUGGER;ENABLE_GENERICS;ENABLE_HOME_SCREEN;ENABLE_IMAGEEFFECTS;ENABLE_LIGHT_PROBES_LEGACY;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_PLUGIN_INSPECTOR;ENABLE_SHADOWS;ENABLE_SINGLE_INSTANCE_BUILD_SETTING;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_RAKNET;ENABLE_UNET;ENABLE_UNITYEVENTS;ENABLE_VR;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_EDITOR_METRICS;ENABLE_REFLECTION_BUFFERS;INCLUDE_DYNAMIC_GI;INCLUDE_GI;INCLUDE_IL2CPP;INCLUDE_DIRECTX12;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;ENABLE_LOCALIZATION;ENABLE_ANDROID_ATLAS_ETC1_COMPRESSION;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_TEXTUREID_MAP;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_LOG_MIXED_STACKTRACE;ENABLE_UNITYWEBREQUEST;ENABLE_EVENT_QUEUE;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;ENABLE_PROFILER;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;CROSS_PLATFORM_INPUT + DEBUG;TRACE;UNITY_5_2_2;UNITY_5_2;UNITY_5;ENABLE_NEW_BUGREPORTER;ENABLE_2D_PHYSICS;ENABLE_4_6_FEATURES;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_FRAME_DEBUGGER;ENABLE_GENERICS;ENABLE_HOME_SCREEN;ENABLE_IMAGEEFFECTS;ENABLE_LIGHT_PROBES_LEGACY;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_PLUGIN_INSPECTOR;ENABLE_SHADOWS;ENABLE_SINGLE_INSTANCE_BUILD_SETTING;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_RAKNET;ENABLE_UNET;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_EDITOR_METRICS;ENABLE_REFLECTION_BUFFERS;INCLUDE_DYNAMIC_GI;INCLUDE_GI;INCLUDE_IL2CPP;INCLUDE_DIRECTX12;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;ENABLE_LOCALIZATION;ENABLE_ANDROID_ATLAS_ETC1_COMPRESSION;UNITY_WEBPLAYER;ENABLE_SUBSTANCE;WEBPLUG;ENABLE_TEXTUREID_MAP;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_MONO;ENABLE_PROFILER;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;CROSS_PLATFORM_INPUT prompt 4 0169 diff --git a/DreamInvasion/Assembly-CSharp-firstpass.csproj b/DreamInvasion/Assembly-CSharp-firstpass.csproj index 5bab01b..f75ba84 100644 --- a/DreamInvasion/Assembly-CSharp-firstpass.csproj +++ b/DreamInvasion/Assembly-CSharp-firstpass.csproj @@ -19,7 +19,7 @@ full false Temp\bin\Debug\ - DEBUG;TRACE;UNITY_5_2_2;UNITY_5_2;UNITY_5;ENABLE_NEW_BUGREPORTER;ENABLE_2D_PHYSICS;ENABLE_4_6_FEATURES;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_FRAME_DEBUGGER;ENABLE_GENERICS;ENABLE_HOME_SCREEN;ENABLE_IMAGEEFFECTS;ENABLE_LIGHT_PROBES_LEGACY;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_PLUGIN_INSPECTOR;ENABLE_SHADOWS;ENABLE_SINGLE_INSTANCE_BUILD_SETTING;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_RAKNET;ENABLE_UNET;ENABLE_UNITYEVENTS;ENABLE_VR;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_EDITOR_METRICS;ENABLE_REFLECTION_BUFFERS;INCLUDE_DYNAMIC_GI;INCLUDE_GI;INCLUDE_IL2CPP;INCLUDE_DIRECTX12;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;ENABLE_LOCALIZATION;ENABLE_ANDROID_ATLAS_ETC1_COMPRESSION;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_TEXTUREID_MAP;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_LOG_MIXED_STACKTRACE;ENABLE_UNITYWEBREQUEST;ENABLE_EVENT_QUEUE;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;ENABLE_PROFILER;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;CROSS_PLATFORM_INPUT + DEBUG;TRACE;UNITY_5_2_2;UNITY_5_2;UNITY_5;ENABLE_NEW_BUGREPORTER;ENABLE_2D_PHYSICS;ENABLE_4_6_FEATURES;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_FRAME_DEBUGGER;ENABLE_GENERICS;ENABLE_HOME_SCREEN;ENABLE_IMAGEEFFECTS;ENABLE_LIGHT_PROBES_LEGACY;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_PLUGIN_INSPECTOR;ENABLE_SHADOWS;ENABLE_SINGLE_INSTANCE_BUILD_SETTING;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_RAKNET;ENABLE_UNET;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_EDITOR_METRICS;ENABLE_REFLECTION_BUFFERS;INCLUDE_DYNAMIC_GI;INCLUDE_GI;INCLUDE_IL2CPP;INCLUDE_DIRECTX12;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;ENABLE_LOCALIZATION;ENABLE_ANDROID_ATLAS_ETC1_COMPRESSION;UNITY_WEBPLAYER;ENABLE_SUBSTANCE;WEBPLUG;ENABLE_TEXTUREID_MAP;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_MONO;ENABLE_PROFILER;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;CROSS_PLATFORM_INPUT prompt 4 0169 diff --git a/DreamInvasion/Assembly-CSharp.csproj b/DreamInvasion/Assembly-CSharp.csproj index 77efa7a..984dcd2 100644 --- a/DreamInvasion/Assembly-CSharp.csproj +++ b/DreamInvasion/Assembly-CSharp.csproj @@ -19,7 +19,7 @@ full false Temp\bin\Debug\ - DEBUG;TRACE;UNITY_5_2_2;UNITY_5_2;UNITY_5;ENABLE_NEW_BUGREPORTER;ENABLE_2D_PHYSICS;ENABLE_4_6_FEATURES;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_FRAME_DEBUGGER;ENABLE_GENERICS;ENABLE_HOME_SCREEN;ENABLE_IMAGEEFFECTS;ENABLE_LIGHT_PROBES_LEGACY;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_PLUGIN_INSPECTOR;ENABLE_SHADOWS;ENABLE_SINGLE_INSTANCE_BUILD_SETTING;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_RAKNET;ENABLE_UNET;ENABLE_UNITYEVENTS;ENABLE_VR;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_EDITOR_METRICS;ENABLE_REFLECTION_BUFFERS;INCLUDE_DYNAMIC_GI;INCLUDE_GI;INCLUDE_IL2CPP;INCLUDE_DIRECTX12;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;ENABLE_LOCALIZATION;ENABLE_ANDROID_ATLAS_ETC1_COMPRESSION;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_TEXTUREID_MAP;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_LOG_MIXED_STACKTRACE;ENABLE_UNITYWEBREQUEST;ENABLE_EVENT_QUEUE;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;ENABLE_PROFILER;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;CROSS_PLATFORM_INPUT + DEBUG;TRACE;UNITY_5_2_2;UNITY_5_2;UNITY_5;ENABLE_NEW_BUGREPORTER;ENABLE_2D_PHYSICS;ENABLE_4_6_FEATURES;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_FRAME_DEBUGGER;ENABLE_GENERICS;ENABLE_HOME_SCREEN;ENABLE_IMAGEEFFECTS;ENABLE_LIGHT_PROBES_LEGACY;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_PLUGIN_INSPECTOR;ENABLE_SHADOWS;ENABLE_SINGLE_INSTANCE_BUILD_SETTING;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_RAKNET;ENABLE_UNET;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_EDITOR_METRICS;ENABLE_REFLECTION_BUFFERS;INCLUDE_DYNAMIC_GI;INCLUDE_GI;INCLUDE_IL2CPP;INCLUDE_DIRECTX12;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;ENABLE_LOCALIZATION;ENABLE_ANDROID_ATLAS_ETC1_COMPRESSION;UNITY_WEBPLAYER;ENABLE_SUBSTANCE;WEBPLUG;ENABLE_TEXTUREID_MAP;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_MONO;ENABLE_PROFILER;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;CROSS_PLATFORM_INPUT prompt 4 0169 @@ -46,26 +46,29 @@ + + + + - diff --git a/DreamInvasion/Assets/Resources/Animations/animation tonneau explosif_0.controller b/DreamInvasion/Assets/Resources/Animations/animation tonneau explosif_0.controller index 61a378e..35ba40d 100644 Binary files a/DreamInvasion/Assets/Resources/Animations/animation tonneau explosif_0.controller and b/DreamInvasion/Assets/Resources/Animations/animation tonneau explosif_0.controller differ diff --git a/DreamInvasion/Assets/Resources/Musique.meta b/DreamInvasion/Assets/Resources/Musique.meta new file mode 100644 index 0000000..7ce91e5 --- /dev/null +++ b/DreamInvasion/Assets/Resources/Musique.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 3a392f64574fa204db5057c1af7e3fd1 +folderAsset: yes +timeCreated: 1448195301 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/DreamInvasion/Assets/Resources/Musique/Unijam.wav b/DreamInvasion/Assets/Resources/Musique/Unijam.wav new file mode 100644 index 0000000..9ff89a2 Binary files /dev/null and b/DreamInvasion/Assets/Resources/Musique/Unijam.wav differ diff --git a/DreamInvasion/Assets/Resources/Musique/Unijam.wav.meta b/DreamInvasion/Assets/Resources/Musique/Unijam.wav.meta new file mode 100644 index 0000000..adbac0a --- /dev/null +++ b/DreamInvasion/Assets/Resources/Musique/Unijam.wav.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 636759a9968bfc44e9bb898be5c76d42 +timeCreated: 1448195303 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/DreamInvasion/Assets/Resources/Musique/boss.wav b/DreamInvasion/Assets/Resources/Musique/boss.wav new file mode 100644 index 0000000..3330452 Binary files /dev/null and b/DreamInvasion/Assets/Resources/Musique/boss.wav differ diff --git a/DreamInvasion/Assets/Resources/Musique/boss.wav.meta b/DreamInvasion/Assets/Resources/Musique/boss.wav.meta new file mode 100644 index 0000000..36c085f --- /dev/null +++ b/DreamInvasion/Assets/Resources/Musique/boss.wav.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 934e081933ff66e4fbcabbd54b4f9db4 +timeCreated: 1448195304 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/DreamInvasion/Assets/Resources/Prefabs/BlueWarrior.prefab b/DreamInvasion/Assets/Resources/Prefabs/BlueWarrior.prefab index e8d592a..e9bf6db 100644 Binary files a/DreamInvasion/Assets/Resources/Prefabs/BlueWarrior.prefab and b/DreamInvasion/Assets/Resources/Prefabs/BlueWarrior.prefab differ diff --git a/DreamInvasion/Assets/Resources/Prefabs/Fire.prefab b/DreamInvasion/Assets/Resources/Prefabs/Fire.prefab new file mode 100644 index 0000000..a48d290 Binary files /dev/null and b/DreamInvasion/Assets/Resources/Prefabs/Fire.prefab differ diff --git a/DreamInvasion/Assets/Resources/Prefabs/Tonneau explosif.prefab.meta b/DreamInvasion/Assets/Resources/Prefabs/Fire.prefab.meta similarity index 65% rename from DreamInvasion/Assets/Resources/Prefabs/Tonneau explosif.prefab.meta rename to DreamInvasion/Assets/Resources/Prefabs/Fire.prefab.meta index fb7fd27..277775a 100644 --- a/DreamInvasion/Assets/Resources/Prefabs/Tonneau explosif.prefab.meta +++ b/DreamInvasion/Assets/Resources/Prefabs/Fire.prefab.meta @@ -1,6 +1,6 @@ fileFormatVersion: 2 -guid: 0b8a32dd15f52ad4ca39f5858616260b -timeCreated: 1448123307 +guid: ea1a1439e65c4c24fb6d68b72c1dc8bf +timeCreated: 1448185328 licenseType: Free NativeFormatImporter: userData: diff --git a/DreamInvasion/Assets/Resources/Prefabs/InterUI_Moyen.prefab b/DreamInvasion/Assets/Resources/Prefabs/InterUI_Moyen.prefab new file mode 100644 index 0000000..bc5e627 Binary files /dev/null and b/DreamInvasion/Assets/Resources/Prefabs/InterUI_Moyen.prefab differ diff --git a/DreamInvasion/Assets/Resources/Prefabs/InterUI_Moyen.prefab.meta b/DreamInvasion/Assets/Resources/Prefabs/InterUI_Moyen.prefab.meta new file mode 100644 index 0000000..5b62cb9 --- /dev/null +++ b/DreamInvasion/Assets/Resources/Prefabs/InterUI_Moyen.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 3ae60dd3bc82ffd4da352e946edc14f4 +timeCreated: 1452186615 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/DreamInvasion/Assets/Resources/Prefabs/Level0.prefab b/DreamInvasion/Assets/Resources/Prefabs/Level0.prefab index dac703e..59e1795 100644 Binary files a/DreamInvasion/Assets/Resources/Prefabs/Level0.prefab and b/DreamInvasion/Assets/Resources/Prefabs/Level0.prefab differ diff --git a/DreamInvasion/Assets/Resources/Prefabs/Level0.prefab.meta b/DreamInvasion/Assets/Resources/Prefabs/Level0.prefab.meta index 2fe0561..ec2ee25 100644 --- a/DreamInvasion/Assets/Resources/Prefabs/Level0.prefab.meta +++ b/DreamInvasion/Assets/Resources/Prefabs/Level0.prefab.meta @@ -1,6 +1,6 @@ fileFormatVersion: 2 -guid: a15ff29fc168ed3459a159b38f7160be -timeCreated: 1448143117 +guid: fa4c07bf7f3dcf842892231ca77702f2 +timeCreated: 1452185852 licenseType: Free NativeFormatImporter: userData: diff --git a/DreamInvasion/Assets/Resources/Prefabs/Level0Old.prefab b/DreamInvasion/Assets/Resources/Prefabs/Level0Old.prefab new file mode 100644 index 0000000..70f7f1c Binary files /dev/null and b/DreamInvasion/Assets/Resources/Prefabs/Level0Old.prefab differ diff --git a/DreamInvasion/Assets/Resources/Prefabs/Level0Old.prefab.meta b/DreamInvasion/Assets/Resources/Prefabs/Level0Old.prefab.meta new file mode 100644 index 0000000..2fe0561 --- /dev/null +++ b/DreamInvasion/Assets/Resources/Prefabs/Level0Old.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a15ff29fc168ed3459a159b38f7160be +timeCreated: 1448143117 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/DreamInvasion/Assets/Resources/Prefabs/Level1.prefab b/DreamInvasion/Assets/Resources/Prefabs/Level1.prefab index 16809d7..258a4e9 100644 Binary files a/DreamInvasion/Assets/Resources/Prefabs/Level1.prefab and b/DreamInvasion/Assets/Resources/Prefabs/Level1.prefab differ diff --git a/DreamInvasion/Assets/Resources/Prefabs/Level1.prefab.meta b/DreamInvasion/Assets/Resources/Prefabs/Level1.prefab.meta index 86aba4b..b894265 100644 --- a/DreamInvasion/Assets/Resources/Prefabs/Level1.prefab.meta +++ b/DreamInvasion/Assets/Resources/Prefabs/Level1.prefab.meta @@ -1,6 +1,6 @@ fileFormatVersion: 2 -guid: da21a3b732129b541a4d2d9f0e2a1060 -timeCreated: 1448153166 +guid: f266e3cdbb089e4439b93c65881bd8c2 +timeCreated: 1452185857 licenseType: Free NativeFormatImporter: userData: diff --git a/DreamInvasion/Assets/Resources/Prefabs/Level1Old.prefab b/DreamInvasion/Assets/Resources/Prefabs/Level1Old.prefab new file mode 100644 index 0000000..65f6a7f Binary files /dev/null and b/DreamInvasion/Assets/Resources/Prefabs/Level1Old.prefab differ diff --git a/DreamInvasion/Assets/Resources/Prefabs/Level1Old.prefab.meta b/DreamInvasion/Assets/Resources/Prefabs/Level1Old.prefab.meta new file mode 100644 index 0000000..86aba4b --- /dev/null +++ b/DreamInvasion/Assets/Resources/Prefabs/Level1Old.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: da21a3b732129b541a4d2d9f0e2a1060 +timeCreated: 1448153166 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/DreamInvasion/Assets/Resources/Prefabs/Level2.prefab b/DreamInvasion/Assets/Resources/Prefabs/Level2.prefab index f6bdc73..70be91a 100644 Binary files a/DreamInvasion/Assets/Resources/Prefabs/Level2.prefab and b/DreamInvasion/Assets/Resources/Prefabs/Level2.prefab differ diff --git a/DreamInvasion/Assets/Resources/Prefabs/Level2.prefab.meta b/DreamInvasion/Assets/Resources/Prefabs/Level2.prefab.meta index 87bd270..9ae80c5 100644 --- a/DreamInvasion/Assets/Resources/Prefabs/Level2.prefab.meta +++ b/DreamInvasion/Assets/Resources/Prefabs/Level2.prefab.meta @@ -1,6 +1,6 @@ fileFormatVersion: 2 -guid: 390726e88a07bee4886dbe77613490ed -timeCreated: 1448164510 +guid: 33192ac57d7dbe44881b337a5be3f191 +timeCreated: 1452185878 licenseType: Free NativeFormatImporter: userData: diff --git a/DreamInvasion/Assets/Resources/Prefabs/Level2Old.prefab b/DreamInvasion/Assets/Resources/Prefabs/Level2Old.prefab new file mode 100644 index 0000000..b24c480 Binary files /dev/null and b/DreamInvasion/Assets/Resources/Prefabs/Level2Old.prefab differ diff --git a/DreamInvasion/Assets/Resources/Prefabs/Level2Old.prefab.meta b/DreamInvasion/Assets/Resources/Prefabs/Level2Old.prefab.meta new file mode 100644 index 0000000..87bd270 --- /dev/null +++ b/DreamInvasion/Assets/Resources/Prefabs/Level2Old.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 390726e88a07bee4886dbe77613490ed +timeCreated: 1448164510 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/DreamInvasion/Assets/Resources/Prefabs/RedWarrior.prefab b/DreamInvasion/Assets/Resources/Prefabs/RedWarrior.prefab index 16aec69..ccdb143 100644 Binary files a/DreamInvasion/Assets/Resources/Prefabs/RedWarrior.prefab and b/DreamInvasion/Assets/Resources/Prefabs/RedWarrior.prefab differ diff --git a/DreamInvasion/Assets/Resources/Prefabs/Spike.prefab b/DreamInvasion/Assets/Resources/Prefabs/Spike.prefab index e55f5b3..a630ed1 100644 Binary files a/DreamInvasion/Assets/Resources/Prefabs/Spike.prefab and b/DreamInvasion/Assets/Resources/Prefabs/Spike.prefab differ diff --git a/DreamInvasion/Assets/Resources/Prefabs/Square.prefab b/DreamInvasion/Assets/Resources/Prefabs/Square.prefab index 298e245..40349dc 100644 Binary files a/DreamInvasion/Assets/Resources/Prefabs/Square.prefab and b/DreamInvasion/Assets/Resources/Prefabs/Square.prefab differ diff --git a/DreamInvasion/Assets/Resources/Prefabs/Tonneau explosif.prefab b/DreamInvasion/Assets/Resources/Prefabs/TonneauExplosif.prefab similarity index 64% rename from DreamInvasion/Assets/Resources/Prefabs/Tonneau explosif.prefab rename to DreamInvasion/Assets/Resources/Prefabs/TonneauExplosif.prefab index 393d1e4..eaeb6b8 100644 Binary files a/DreamInvasion/Assets/Resources/Prefabs/Tonneau explosif.prefab and b/DreamInvasion/Assets/Resources/Prefabs/TonneauExplosif.prefab differ diff --git a/DreamInvasion/Assets/Resources/Prefabs/TonneauExplosif.prefab.meta b/DreamInvasion/Assets/Resources/Prefabs/TonneauExplosif.prefab.meta new file mode 100644 index 0000000..dafacdf --- /dev/null +++ b/DreamInvasion/Assets/Resources/Prefabs/TonneauExplosif.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ab289cd6796784a42bc1f06daefb6a2a +timeCreated: 1448187817 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/DreamInvasion/Assets/Resources/Prefabs/tile.prefab b/DreamInvasion/Assets/Resources/Prefabs/tile.prefab index 8a25eec..b1ee581 100644 Binary files a/DreamInvasion/Assets/Resources/Prefabs/tile.prefab and b/DreamInvasion/Assets/Resources/Prefabs/tile.prefab differ diff --git a/DreamInvasion/Assets/Resources/Sprites/Barrel explode/animation tonneau final_0.controller b/DreamInvasion/Assets/Resources/Sprites/Barrel explode/animation tonneau final_0.controller index e0c5f24..06d95ae 100644 Binary files a/DreamInvasion/Assets/Resources/Sprites/Barrel explode/animation tonneau final_0.controller and b/DreamInvasion/Assets/Resources/Sprites/Barrel explode/animation tonneau final_0.controller differ diff --git a/DreamInvasion/Assets/Resources/Sprites/Stomp/stomp idle_0.controller b/DreamInvasion/Assets/Resources/Sprites/Stomp/stomp idle_0.controller index 23e47b9..38dd4fb 100644 Binary files a/DreamInvasion/Assets/Resources/Sprites/Stomp/stomp idle_0.controller and b/DreamInvasion/Assets/Resources/Sprites/Stomp/stomp idle_0.controller differ diff --git a/DreamInvasion/Assets/Resources/bruitages.meta b/DreamInvasion/Assets/Resources/bruitages.meta new file mode 100644 index 0000000..a2cdbec --- /dev/null +++ b/DreamInvasion/Assets/Resources/bruitages.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 1add539069e9d714aa7f8935faf1114c +folderAsset: yes +timeCreated: 1448195301 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/DreamInvasion/Assets/Resources/bruitages/TapeDansLeVide.wav b/DreamInvasion/Assets/Resources/bruitages/TapeDansLeVide.wav new file mode 100644 index 0000000..1773f78 Binary files /dev/null and b/DreamInvasion/Assets/Resources/bruitages/TapeDansLeVide.wav differ diff --git a/DreamInvasion/Assets/Resources/bruitages/TapeDansLeVide.wav.meta b/DreamInvasion/Assets/Resources/bruitages/TapeDansLeVide.wav.meta new file mode 100644 index 0000000..610ad9e --- /dev/null +++ b/DreamInvasion/Assets/Resources/bruitages/TapeDansLeVide.wav.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 04f501f545998524b931df2c7db3f175 +timeCreated: 1448195301 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/DreamInvasion/Assets/Resources/bruitages/boule.wav b/DreamInvasion/Assets/Resources/bruitages/boule.wav new file mode 100644 index 0000000..e563d9d Binary files /dev/null and b/DreamInvasion/Assets/Resources/bruitages/boule.wav differ diff --git a/DreamInvasion/Assets/Resources/bruitages/boule.wav.meta b/DreamInvasion/Assets/Resources/bruitages/boule.wav.meta new file mode 100644 index 0000000..8180548 --- /dev/null +++ b/DreamInvasion/Assets/Resources/bruitages/boule.wav.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 7c622509eda09cb418bb89a5bf6bbb65 +timeCreated: 1448195303 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/DreamInvasion/Assets/Resources/bruitages/brulure.wav b/DreamInvasion/Assets/Resources/bruitages/brulure.wav new file mode 100644 index 0000000..ad78165 Binary files /dev/null and b/DreamInvasion/Assets/Resources/bruitages/brulure.wav differ diff --git a/DreamInvasion/Assets/Resources/bruitages/brulure.wav.meta b/DreamInvasion/Assets/Resources/bruitages/brulure.wav.meta new file mode 100644 index 0000000..494a05e --- /dev/null +++ b/DreamInvasion/Assets/Resources/bruitages/brulure.wav.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 3e353602442d0be408f028a78686961d +timeCreated: 1448195302 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/DreamInvasion/Assets/Resources/bruitages/decapitation.mp3 b/DreamInvasion/Assets/Resources/bruitages/decapitation.mp3 new file mode 100644 index 0000000..a72e248 Binary files /dev/null and b/DreamInvasion/Assets/Resources/bruitages/decapitation.mp3 differ diff --git a/DreamInvasion/Assets/Resources/bruitages/decapitation.mp3.meta b/DreamInvasion/Assets/Resources/bruitages/decapitation.mp3.meta new file mode 100644 index 0000000..c3e82c6 --- /dev/null +++ b/DreamInvasion/Assets/Resources/bruitages/decapitation.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: c15d605b863cb2945a5971e72b93a659 +timeCreated: 1448195305 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/DreamInvasion/Assets/Resources/bruitages/explosion.wav b/DreamInvasion/Assets/Resources/bruitages/explosion.wav new file mode 100644 index 0000000..e84415d Binary files /dev/null and b/DreamInvasion/Assets/Resources/bruitages/explosion.wav differ diff --git a/DreamInvasion/Assets/Resources/bruitages/explosion.wav.meta b/DreamInvasion/Assets/Resources/bruitages/explosion.wav.meta new file mode 100644 index 0000000..84482fe --- /dev/null +++ b/DreamInvasion/Assets/Resources/bruitages/explosion.wav.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 9b53a5cdef5600b49ab5c07420b10d5f +timeCreated: 1448195304 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/DreamInvasion/Assets/Resources/bruitages/impact.mp3 b/DreamInvasion/Assets/Resources/bruitages/impact.mp3 new file mode 100644 index 0000000..e40de65 Binary files /dev/null and b/DreamInvasion/Assets/Resources/bruitages/impact.mp3 differ diff --git a/DreamInvasion/Assets/Resources/bruitages/impact.mp3.meta b/DreamInvasion/Assets/Resources/bruitages/impact.mp3.meta new file mode 100644 index 0000000..22b9c17 --- /dev/null +++ b/DreamInvasion/Assets/Resources/bruitages/impact.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: a56a8a16ccb083e4fb9d1770dc2d2b8c +timeCreated: 1448195304 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/DreamInvasion/Assets/Resources/bruitages/impact.wav b/DreamInvasion/Assets/Resources/bruitages/impact.wav new file mode 100644 index 0000000..fd9025e Binary files /dev/null and b/DreamInvasion/Assets/Resources/bruitages/impact.wav differ diff --git a/DreamInvasion/Assets/Resources/bruitages/impact.wav.meta b/DreamInvasion/Assets/Resources/bruitages/impact.wav.meta new file mode 100644 index 0000000..053048b --- /dev/null +++ b/DreamInvasion/Assets/Resources/bruitages/impact.wav.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: ad494f77b941bf04aa3622f5f20363f4 +timeCreated: 1448195305 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/DreamInvasion/Assets/Resources/bruitages/lancer.wav b/DreamInvasion/Assets/Resources/bruitages/lancer.wav new file mode 100644 index 0000000..786d884 Binary files /dev/null and b/DreamInvasion/Assets/Resources/bruitages/lancer.wav differ diff --git a/DreamInvasion/Assets/Resources/bruitages/lancer.wav.meta b/DreamInvasion/Assets/Resources/bruitages/lancer.wav.meta new file mode 100644 index 0000000..e9411c3 --- /dev/null +++ b/DreamInvasion/Assets/Resources/bruitages/lancer.wav.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: a573638d9a5d47c44a619181887cdcfb +timeCreated: 1448195305 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/DreamInvasion/Assets/Resources/bruitages/twomp.wav b/DreamInvasion/Assets/Resources/bruitages/twomp.wav new file mode 100644 index 0000000..e208d67 Binary files /dev/null and b/DreamInvasion/Assets/Resources/bruitages/twomp.wav differ diff --git a/DreamInvasion/Assets/Resources/bruitages/twomp.wav.meta b/DreamInvasion/Assets/Resources/bruitages/twomp.wav.meta new file mode 100644 index 0000000..491ce73 --- /dev/null +++ b/DreamInvasion/Assets/Resources/bruitages/twomp.wav.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 1b519ab2aace8ef45a9ed992f3bafa6d +timeCreated: 1448195301 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/DreamInvasion/Assets/Scenes/Khoub_dimanche_02h34.unity b/DreamInvasion/Assets/Scenes/Khoub_dimanche_02h34.unity new file mode 100644 index 0000000..32e2a7c Binary files /dev/null and b/DreamInvasion/Assets/Scenes/Khoub_dimanche_02h34.unity differ diff --git a/DreamInvasion/Assets/Scenes/Khoub_dimanche_02h34.unity.meta b/DreamInvasion/Assets/Scenes/Khoub_dimanche_02h34.unity.meta new file mode 100644 index 0000000..9992b99 --- /dev/null +++ b/DreamInvasion/Assets/Scenes/Khoub_dimanche_02h34.unity.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7312ec1e055d675469975296434c1252 +timeCreated: 1448156093 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/DreamInvasion/Assets/Scenes/Main.unity b/DreamInvasion/Assets/Scenes/Main.unity new file mode 100644 index 0000000..0111b3f Binary files /dev/null and b/DreamInvasion/Assets/Scenes/Main.unity differ diff --git a/DreamInvasion/Assets/Scenes/Main.unity.meta b/DreamInvasion/Assets/Scenes/Main.unity.meta new file mode 100644 index 0000000..d281462 --- /dev/null +++ b/DreamInvasion/Assets/Scenes/Main.unity.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8b6def5574bb8324ca1767dde5f4b3ef +timeCreated: 1448201608 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/DreamInvasion/Assets/Scenes/Steph_1.unity b/DreamInvasion/Assets/Scenes/Steph_1.unity index 8cf10d3..834f442 100644 Binary files a/DreamInvasion/Assets/Scenes/Steph_1.unity and b/DreamInvasion/Assets/Scenes/Steph_1.unity differ diff --git a/DreamInvasion/Assets/Scripts/Attack.cs b/DreamInvasion/Assets/Scripts/Attack.cs index d9731f4..94d8523 100644 --- a/DreamInvasion/Assets/Scripts/Attack.cs +++ b/DreamInvasion/Assets/Scripts/Attack.cs @@ -4,13 +4,17 @@ public class Attack : MonoBehaviour { [SerializeField] - int damage = 1; + int damage; [SerializeField] - int attack_speed = 1; + int attack_speed; [SerializeField] - float speed = 1; + float speed; [SerializeField] - float distance = 1; + float distance; + + [SerializeField] + public Animator m_Anim; + float timeOfLastAttack; [SerializeField] @@ -36,7 +40,12 @@ void Update () { if (Input.GetButtonDown("Fire" + player.id) && !attacked) { - + + m_Anim.SetBool("attack", true); + m_Anim.SetBool("move", false); + m_Anim.SetBool("idle", false); + m_Anim.SetBool("jump", false); + this.GetComponent().enabled = true; scriptRotation.RotateDown(); @@ -47,6 +56,11 @@ void Update () { if(attacked && Time.time > timeOfLastAttack + cooldownBetweenAttacks) { + m_Anim.SetBool("attack", false); + m_Anim.SetBool("move", false); + m_Anim.SetBool("idle", true); + m_Anim.SetBool("jump", false); + this.GetComponent().enabled = false; attacked = false; @@ -59,8 +73,8 @@ void Update () { private void OnTriggerEnter2D(Collider2D other) { if (other.CompareTag("Player")) { + Debug.Log(transform.parent.parent.name); other.GetComponent().TakeDamage(damage); - Debug.Log(other.GetComponent().id); } } } diff --git a/DreamInvasion/Assets/Scripts/Audio.cs b/DreamInvasion/Assets/Scripts/Audio.cs new file mode 100644 index 0000000..30191f2 --- /dev/null +++ b/DreamInvasion/Assets/Scripts/Audio.cs @@ -0,0 +1,57 @@ +using UnityEngine; +using System.Collections; + +public class Audio : MonoBehaviour { + + [SerializeField] + Camera level1; + [SerializeField] + Camera level2; + [SerializeField] + Camera level3; + [SerializeField] + GameManager manager; + AudioSource audioclip; + public AudioClip theme; + public AudioClip otherclip; + int currentLevel = 0; + // Use this for initialization + void Start () { + transform.position = level1.transform.position; + audioclip = GetComponent(); + } + + // Update is called once per frame + void Update() { + if (!audioclip.isPlaying) { + audioclip.Play(); + } + if (manager.currentlevel != currentLevel) { + if (manager.currentlevel == 0) { + transform.position = level1.transform.position; + } else if (manager.currentlevel == 1) { + transform.position = level2.transform.position; + if (currentLevel == 2) { + if (audioclip.isPlaying) { + audioclip.Stop(); + } + audioclip.clip = theme; + audioclip.Play(); + } + } else if (manager.currentlevel == 2) { + transform.position = level3.transform.position; + if (audioclip.isPlaying) { + audioclip.Stop(); + } + audioclip.clip = otherclip; + audioclip.Play(); + } + currentLevel = manager.currentlevel; + } + } + + public void Restart() { + audioclip.Stop(); + audioclip.clip = theme; + } +} diff --git a/DreamInvasion/Assets/Scripts/Audio.cs.meta b/DreamInvasion/Assets/Scripts/Audio.cs.meta new file mode 100644 index 0000000..a9f6eac --- /dev/null +++ b/DreamInvasion/Assets/Scripts/Audio.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: de8d3de945051b741baf1229d348b519 +timeCreated: 1448195372 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/DreamInvasion/Assets/Scripts/GameManager/GameManager.cs b/DreamInvasion/Assets/Scripts/GameManager/GameManager.cs index a186bab..60613cb 100644 --- a/DreamInvasion/Assets/Scripts/GameManager/GameManager.cs +++ b/DreamInvasion/Assets/Scripts/GameManager/GameManager.cs @@ -8,15 +8,17 @@ public class GameManager : MonoBehaviour { GameObject[] players; GameObject[] levels; GameObject[] cursors; + GameObject[] bosses; GameObject[] safezones; [SerializeField] int nbLevels; - int currentlevel; + public int currentlevel; int currentLoser; // Use this for initialization public static event Action OnNewLevel; + public static event Action OnGameOver; void OnEnable() { @@ -38,12 +40,18 @@ private void OnDeath(int id) { currentlevel++; if (currentlevel >= levels.Length) { currentlevel = 0; - Time.timeScale = 0f; - Debug.Log("Game Over"); + Time.timeScale = 0.0f; + if (OnGameOver != null) { + //levels = new GameObject[nbLevels]; + OnGameOver(); + } return; } levels[currentlevel].SetActive(true); } else { + if (currentlevel == levels.Length - 1) { + bosses[currentLoser - 1].SetActive(false); + } currentlevel--; if (currentlevel == 0) currentLoser = -1; levels[currentlevel].SetActive(true); @@ -60,36 +68,49 @@ private void OnDeath(int id) { } void Awake () { - players = GameObject.FindGameObjectsWithTag("Player"); - + players = new GameObject[2]; + bosses = new GameObject[2]; + players[0] = GameObject.Find("BlueWarrior"); + players[1] = GameObject.Find("RedWarrior"); + bosses[0] = GameObject.Find("BlueBoss"); + bosses[1] = GameObject.Find("RedBoss"); cursors = GameObject.FindGameObjectsWithTag("Cursor"); levels = new GameObject[nbLevels]; safezones = new GameObject[levels.Length - 1]; levels[0] = GameObject.Find("Level0"); + for (int i = 1; i < nbLevels; ++i) { - levels[i] = GameObject.Find("Level"+i); - levels[i].SetActive(false); + levels[i] = GameObject.Find("Level" + i); } for (int i = 1; i < nbLevels - 1; ++i) { safezones[i - 1] = levels[i].transform.FindChild("Safezone").gameObject; } - - currentlevel = 0; - currentLoser = -1; } void Start() { for (int i = 0; i < players.Length; ++i) { players[i].GetComponent().id = i + 1; + bosses[i].GetComponent().id = i + 1; cursors[i].GetComponent().id = i + 1; cursors[i].SetActive(false); - Debug.Log("id : "+(i + 1)); } + for (int i = 0; i < bosses.Length; ++i) { + bosses[i].SetActive(false); + players[i].SetActive(true); + } + for (int i = 1; i < nbLevels; ++i) { + levels[i].SetActive(false); + } + levels[0].SetActive(true); + players[0].transform.position = new Vector2(-1.3f, -2.6f); + players[1].transform.position = new Vector2(1.3f, -2.6f); + currentlevel = 0; + currentLoser = -1; + Time.timeScale = 1f; } // Update is called once per frame void Update () { - - } + } void SetPlayers() { if (currentLoser == -1) { @@ -97,8 +118,8 @@ void SetPlayers() { players[i].SetActive(true); cursors[i].SetActive(false); } - players[0].transform.position = new Vector2(1.3f, -2.6f); - players[1].transform.position = new Vector2(-1.3f, -2.6f); + players[0].transform.position = new Vector2(-1.3f, -2.6f); + players[1].transform.position = new Vector2(1.3f, -2.6f); } else { if (currentlevel == nbLevels-1) { if (1 == currentLoser) { @@ -106,8 +127,9 @@ void SetPlayers() { } else { players[0].transform.position = new Vector2(108.3f, 2.25f); } - players[currentLoser - 1].transform.position = new Vector2(108.3f, 6.2f); - players[currentLoser - 1].SetActive(true); + bosses[currentLoser - 1].transform.position = new Vector2(108.3f, 6.2f); + bosses[currentLoser - 1].SetActive(true); + cursors[currentLoser - 1].SetActive(false); return; } for (int i = 0; i < players.Length; ++i) { @@ -130,4 +152,11 @@ void SetCamera() { Camera.main.GetComponent().m_Player = players[winner-1].transform; } } + + public void Restart() { + Start(); + foreach (var boss in bosses) { + boss.GetComponent().lifeLeft = boss.GetComponent().lifeMax; + } + } } diff --git a/DreamInvasion/Assets/Scripts/GameManager/GameManager.cs.meta b/DreamInvasion/Assets/Scripts/GameManager/GameManager.cs.meta index 8639da1..166d0df 100644 --- a/DreamInvasion/Assets/Scripts/GameManager/GameManager.cs.meta +++ b/DreamInvasion/Assets/Scripts/GameManager/GameManager.cs.meta @@ -1,11 +1,11 @@ fileFormatVersion: 2 guid: defd4bbd162b6904fb76dc2269f3c471 -timeCreated: 1448087976 +timeCreated: 1448194774 licenseType: Free MonoImporter: serializedVersion: 2 defaultReferences: [] - executionOrder: 0 + executionOrder: 200 icon: {instanceID: 0} userData: assetBundleName: diff --git a/DreamInvasion/Assets/Scripts/GameManager/UIManager.cs b/DreamInvasion/Assets/Scripts/GameManager/UIManager.cs new file mode 100644 index 0000000..7eff3ac --- /dev/null +++ b/DreamInvasion/Assets/Scripts/GameManager/UIManager.cs @@ -0,0 +1,37 @@ +using UnityEngine; +using System.Collections; + +public class UIManager : MonoBehaviour { + + [SerializeField] + GameObject canvas; + + [SerializeField] + GameObject gameOverCam; + + void Awake () { + canvas.SetActive(false); + gameOverCam.SetActive(false); + } + + void OnEnable() { + GameManager.OnGameOver += OnGameOver; + } + + private void OnGameOver() { + canvas.SetActive(true); + gameOverCam.SetActive(true); + } + + public void Restart () { + //Application.LoadLevel(Application.loadedLevel); + canvas.SetActive(false); + gameOverCam.SetActive(false); + GameObject.Find("GameManager").GetComponent().Restart(); + GameObject.Find("Audio Source").GetComponent