From d19ac84deb2c78403f6d90b878e4d8ee6d6ebe6a Mon Sep 17 00:00:00 2001 From: Nyghor Date: Thu, 4 Oct 2018 01:04:17 +0200 Subject: [PATCH] TV kinematic. Boss adjustment on enemy spawn --- ShowPT/Assets/Scenes/Game.unity | 57 ++++++++++++++++++++++--- ShowPT/Assets/Scripts/BossController.cs | 14 ++++-- 2 files changed, 62 insertions(+), 9 deletions(-) diff --git a/ShowPT/Assets/Scenes/Game.unity b/ShowPT/Assets/Scenes/Game.unity index ec7d75e5..3920533b 100644 --- a/ShowPT/Assets/Scenes/Game.unity +++ b/ShowPT/Assets/Scenes/Game.unity @@ -15880,6 +15880,11 @@ Prefab: propertyPath: m_StaticEditorFlags value: 0 objectReference: {fileID: 0} + - target: {fileID: 114831065349948792, guid: 85312d28f45a9234098bcd3ae18f2239, + type: 2} + propertyPath: detectionDistance + value: 30 + objectReference: {fileID: 0} m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 85312d28f45a9234098bcd3ae18f2239, type: 2} m_IsPrefabParent: 0 @@ -90576,8 +90581,8 @@ Mesh: firstVertex: 0 vertexCount: 14 localAABB: - m_Center: {x: -0.0050805807, y: -0.0003620386, z: 0.05538082} - m_Extent: {x: 0.50299054, y: 0.50172156, z: 0.34048122} + m_Center: {x: -0.0050805807, y: -0.0003620386, z: 0.055380136} + m_Extent: {x: 0.50299054, y: 0.50172156, z: 0.3404822} m_Shapes: vertices: [] shapes: [] @@ -90630,7 +90635,7 @@ Mesh: format: 0 dimension: 0 m_DataSize: 560 - _typelessdata: d86288be8926da3d2887023e8bbe03bf70f19a3d59a45abf1b15133f6c9c643f1b15133f6c9c643f7a1bbbbbaa0000bfc484b93ceacdbfbe823085ba955b6dbf7e44213fdfc4483f7e44213fdfc4483f26faf9be001dffbeaae71f3ef56713bf5d58313e738d4cbf48fa063fdfc4483f48fa063fdfc4483f728ffd3e75ec693daef891be85f7f3be16bf9bbbcf1061bf20bb3c3f8860623f20bb3c3f8860623fb937fe3e64ef93be8d5587bea53bb2beb31d08be2f906dbf20bb3c3ff287523f20bb3c3ff287523f872eca3e1d5700bf6f7948bea53bb2beb31d08be2f906dbfa22b373fdfc4483fa22b373fdfc4483f0eeefe3e8d8800bf69855fbe1b0556be095c55be089974bf20bb3c3fdfc4483f20bb3c3fdfc4483ff31002bf939dfebee54d3e3ebf9e4ebfa3728a3ec35b06bfdf04063fdfc4483fdf04063fdfc4483f65f901bfef42b7bd6eaeca3e846b45bf5224a83d989d21bfdf04063f75995b3fdf04063f75995b3f017501bfd30dc73e3d96a33e92b411bf21ce983d129f51bfdf04063fac95713fdf04063fac95713f279382be1959003fbc583c3e168903bf65360b3e27d958bff7b3133f20bb763ff7b3133f20bb763f485301bff358003f60aaac3ef48704bf26fc0a3e184058bfdf04063f20bb763fdf04063f20bb763f9431dd3e452c003fea156abed560f7be9d588a3dcf775fbfa346393f20bb763fa346393f20bb763f4093fd3e351d003f387c86bedd7af2be518e363d742e61bf20bb3c3f20bb763f20bb3c3f20bb763f + _typelessdata: 5a6288be3627da3d2786023e89be03bf74f19a3d5ba45abf2815133f709c643f2815133f709c643ff8f5babbaa0000bf337cb93ce8cdbfbe053185ba965b6dbf8e44213fdfc4483f8e44213fdfc4483fbbf9f9be001dffbeade61f3ef56713bf5f58313e748d4cbf53fa063fdfc4483f53fa063fdfc4483f728ffd3e17ee693de6f891be82f7f3be2bbf9bbbd01061bf20bb3c3f8d60623f20bb3c3f8d60623fb937fe3e2df093beb75587bea13bb2beb61d08be30906dbf20bb3c3fe087523f20bb3c3fe087523fe52eca3e1d5700bf427a48bea13bb2beb61d08be30906dbfac2b373fdfc4483fac2b373fdfc4483f0eeefe3e8d8800bf10865fbe170556be0d5c55be099974bf20bb3c3fdfc4483f20bb3c3fdfc4483ff31002bf939dfebe344e3e3ebd9e4ebfa4728a3ec45b06bfdf04063fdfc4483fdf04063fdfc4483f65f901bfd743b7bd78aeca3e836b45bf4e24a83d9a9d21bfdf04063f70995b3fdf04063f70995b3f017501bf900ec73e2096a33e90b411bf27ce983d149f51bfdf04063fbd95713fdf04063fbd95713faa9282be1959003fb0573c3e148903bf6b360b3e27d958bf04b4133f20bb763f04b4133f20bb763f485301bff358003f24aaac3ef18704bf2bfc0a3e194058bfdf04063f20bb763fdf04063f20bb763fd331dd3e452c003fa4166abed160f7be9f588a3dcf775fbfaa46393f20bb763faa46393f20bb763f4093fd3e351d003f757c86bed97af2be558e363d752e61bf20bb3c3f20bb763f20bb3c3f20bb763f m_CompressedMesh: m_Vertices: m_NumItems: 0 @@ -90684,8 +90689,8 @@ Mesh: m_BitSize: 0 m_UVInfo: 0 m_LocalAABB: - m_Center: {x: -0.0050805807, y: -0.0003620386, z: 0.05538082} - m_Extent: {x: 0.50299054, y: 0.50172156, z: 0.34048122} + m_Center: {x: -0.0050805807, y: -0.0003620386, z: 0.055380136} + m_Extent: {x: 0.50299054, y: 0.50172156, z: 0.3404822} m_MeshUsageFlags: 0 m_BakedConvexCollisionMesh: m_BakedTriangleCollisionMesh: @@ -91937,6 +91942,11 @@ Prefab: propertyPath: m_StaticEditorFlags value: 0 objectReference: {fileID: 0} + - target: {fileID: 114831065349948792, guid: 85312d28f45a9234098bcd3ae18f2239, + type: 2} + propertyPath: detectionDistance + value: 30 + objectReference: {fileID: 0} m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 85312d28f45a9234098bcd3ae18f2239, type: 2} m_IsPrefabParent: 0 @@ -135763,6 +135773,11 @@ Prefab: propertyPath: m_StaticEditorFlags value: 0 objectReference: {fileID: 0} + - target: {fileID: 114831065349948792, guid: 85312d28f45a9234098bcd3ae18f2239, + type: 2} + propertyPath: detectionDistance + value: 30 + objectReference: {fileID: 0} m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 85312d28f45a9234098bcd3ae18f2239, type: 2} m_IsPrefabParent: 0 @@ -137947,6 +137962,11 @@ Prefab: propertyPath: m_StaticEditorFlags value: 0 objectReference: {fileID: 0} + - target: {fileID: 114831065349948792, guid: 85312d28f45a9234098bcd3ae18f2239, + type: 2} + propertyPath: detectionDistance + value: 30 + objectReference: {fileID: 0} m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 85312d28f45a9234098bcd3ae18f2239, type: 2} m_IsPrefabParent: 0 @@ -175220,6 +175240,26 @@ GameObject: m_PrefabParentObject: {fileID: 1043612173851876, guid: 2076fc81ec43e3947ac42d33b3ac1f94, type: 2} m_PrefabInternal: {fileID: 1370181985} +--- !u!1 &1803139327 stripped +GameObject: + m_PrefabParentObject: {fileID: 1752529428483612, guid: 93a6c15518400ae478bba9a29fd1dd68, + type: 2} + m_PrefabInternal: {fileID: 1552626871} +--- !u!54 &1803139331 +Rigidbody: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1803139327} + serializedVersion: 2 + m_Mass: 1 + m_Drag: 0 + m_AngularDrag: 0.05 + m_UseGravity: 0 + m_IsKinematic: 1 + m_Interpolate: 0 + m_Constraints: 0 + m_CollisionDetection: 0 --- !u!1001 &1808264315 Prefab: m_ObjectHideFlags: 0 @@ -177427,6 +177467,11 @@ Prefab: propertyPath: m_StaticEditorFlags value: 0 objectReference: {fileID: 0} + - target: {fileID: 114831065349948792, guid: 85312d28f45a9234098bcd3ae18f2239, + type: 2} + propertyPath: detectionDistance + value: 30 + objectReference: {fileID: 0} m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 85312d28f45a9234098bcd3ae18f2239, type: 2} m_IsPrefabParent: 0 @@ -189991,7 +190036,7 @@ Prefab: - target: {fileID: 224332113241631034, guid: 9c9ca1374d0264d4fae65facbc13392a, type: 2} propertyPath: m_AnchoredPosition.y - value: 0.05053711 + value: 0.05029297 objectReference: {fileID: 0} - target: {fileID: 224332113241631034, guid: 9c9ca1374d0264d4fae65facbc13392a, type: 2} diff --git a/ShowPT/Assets/Scripts/BossController.cs b/ShowPT/Assets/Scripts/BossController.cs index f73fad28..653edb57 100644 --- a/ShowPT/Assets/Scripts/BossController.cs +++ b/ShowPT/Assets/Scripts/BossController.cs @@ -80,6 +80,7 @@ public class BossController : MonoBehaviour private float explosionEffectsTimer; private float timeToInvokeExplosion; private int explosionsIndex; + private bool firstRoulette; private bool armsActive; private bool chasePlayer; private bool[] spawns; @@ -462,8 +463,15 @@ public void activateRoulette(AnimationEvent animationEvent) if (boolParam != 0) { - //SOB Show roulete - rouletteRoll = Random.Range(1,5); + if (firstRoulette) + { + rouletteRoll = 4; + firstRoulette = false; + } + else + { + rouletteRoll = Random.Range(1, 5); + } } else { @@ -500,7 +508,6 @@ public void summonEnemies(AnimationEvent animationEvent) } EnemySpawn enemySpawn = findEnemySpawn(type); - Debug.Log(enemySpawn.type); int numberSpawns = Random.Range(enemySpawn.minNumEnemies, enemySpawn.maxNumEnemies + 1); //Update roulette texture @@ -797,6 +804,7 @@ private void initializeVars() sideLength = body.GetComponent().bounds.size.z; armsActive = false; chasePlayer = false; + firstRoulette = true; } /**Utils**/