diff --git a/Assets/Axe.cs b/Assets/Axe.cs index 6a740df..66dd65a 100755 --- a/Assets/Axe.cs +++ b/Assets/Axe.cs @@ -13,13 +13,7 @@ void Start () SoundManager play = GameObject.Find("SoundManager").gameObject.GetComponent(); play.PlayWoodCutterAxe (); } - - // Update is called once per frame - void Update () - { - - } - + void OnTriggerEnter2D(Collider2D other) { if(other.gameObject.layer == 12 || other.gameObject.layer == 13) diff --git a/Assets/Objects_Characters/BBW/BBW1.prefab b/Assets/Objects_Characters/BBW/BBW1.prefab index bbacead..759b998 100644 Binary files a/Assets/Objects_Characters/BBW/BBW1.prefab and b/Assets/Objects_Characters/BBW/BBW1.prefab differ diff --git a/Assets/Objects_Characters/BBW/BBW1.prefab.meta b/Assets/Objects_Characters/BBW/BBW1.prefab.meta old mode 100755 new mode 100644 index c5e1a93..33933d8 --- a/Assets/Objects_Characters/BBW/BBW1.prefab.meta +++ b/Assets/Objects_Characters/BBW/BBW1.prefab.meta @@ -1,4 +1,4 @@ fileFormatVersion: 2 -guid: 7f8eb66de2b5c444a9ce6e7a76b665b2 +guid: 8f16558f860ff4e77ab9e12c75892846 NativeFormatImporter: userData: diff --git a/Assets/Objects_Characters/BBW/BBW2.prefab b/Assets/Objects_Characters/BBW/BBW2.prefab index 42cce3e..6fb40bb 100644 Binary files a/Assets/Objects_Characters/BBW/BBW2.prefab and b/Assets/Objects_Characters/BBW/BBW2.prefab differ diff --git a/Assets/Objects_Characters/BBW/BBWController.cs b/Assets/Objects_Characters/BBW/BBWController.cs index 1d7481b..2d137a7 100755 --- a/Assets/Objects_Characters/BBW/BBWController.cs +++ b/Assets/Objects_Characters/BBW/BBWController.cs @@ -17,7 +17,6 @@ public class BBWController : MonoBehaviour { public bool facingRight; // Allows Melee System to tell which direction BBW is facing - //Used to load in the textures for the swap (left text for moving left / right text for moving right) public Texture leftTexture; public Texture rightTexture; @@ -29,6 +28,10 @@ public class BBWController : MonoBehaviour { private float airGravity; //Incremented value for x-axis movement while in the air private float origGravity; //Original gravity of the character private SoundManager play; // The sound manager + //private Transform[] findGlowTransform; + //private Transform glowTransform; + private GameObject[] findGlow; + private GameObject glow; // At start we set the number of jumps performed since leaving the ground to 0 @@ -46,72 +49,103 @@ void Start () airMoves = 1; origGravity = gameObject.rigidbody2D.gravityScale; + + // Find the attached Glow object + glow = GameObject.Find ("Glow"); + glow.renderer.enabled = false; } // Movement controls void Update () { + // Make sure we still have the correct Glow object + glow = GameObject.Find ("Glow"); + + //Fix rotation every update transform.eulerAngles = new Vector3(0,0,0); - //Debug.Log(Input.GetAxis("Horizontal_PLR1")); + if (gameObject.tag == "BBW") { //We check the layer to make sure its player one (layer 12) // If it is we let the pad controls work fine if its not we dont cause it's not player one if (gameObject.layer == 12) { //Move Right if (Input.GetKey (moveRight) || Input.GetAxis ("Horizontal_PLR1") > 0) { - if (airMoves == 1) { + if (airMoves == 1) + { transform.Translate (Vector2.right * speed * Time.deltaTime); - } else if (airMoves > 1) { + } + else if (airMoves > 1) + { transform.Translate (Vector2.right * (speed / airMoves) * Time.deltaTime); airMoves = airMoves + airMoveIncrement; gameObject.rigidbody2D.gravityScale = gameObject.rigidbody2D.gravityScale + airGravityIncrement; } - + + //Switch to Right Texture, position glow GameObject.Find ("BBW").gameObject.GetComponent ().material.SetTexture ("_MainTex", rightTexture); + glow.transform.localPosition = new Vector3 (-0.1f, -0.039f, 0.2f); facingRight = true; } //Move Left + // If BBW is in the air, start to limit movement if (Input.GetKey (moveLeft) || Input.GetAxis ("Horizontal_PLR1") < 0) { - if (airMoves == 1) { + if (airMoves == 1) + { transform.Translate (-Vector2.right * speed * Time.deltaTime); - } else if (airMoves > 1) { + } + else if (airMoves > 1) + { transform.Translate (-Vector2.right * (speed / airMoves) * Time.deltaTime); airMoves = airMoves + airMoveIncrement; gameObject.rigidbody2D.gravityScale = gameObject.rigidbody2D.gravityScale + airGravityIncrement; } - + + //Switch to Left Texture, position glow GameObject.Find ("BBW").gameObject.GetComponent ().material.SetTexture ("_MainTex", leftTexture); + glow.transform.localPosition = new Vector3 (0.08f, -0.04f, 0.2f); facingRight = false; } }else{ //END OF PLAYER 1 LAYER CHECK if (gameObject.tag == "BBW") { //Move Right + // If BBW is in the air, start to limit movement if (Input.GetKey (moveRight)) { - if (airMoves == 1) { + if (airMoves == 1) + { transform.Translate (Vector2.right * speed * Time.deltaTime); - } else if (airMoves > 1) { + } + else if (airMoves > 1) + { transform.Translate (Vector2.right * (speed / airMoves) * Time.deltaTime); airMoves = airMoves + airMoveIncrement; gameObject.rigidbody2D.gravityScale = gameObject.rigidbody2D.gravityScale + airGravityIncrement; } - + + //Switch to Right Texture, position glow GameObject.Find ("BBW").gameObject.GetComponent ().material.SetTexture ("_MainTex", rightTexture); + glow.transform.localPosition = new Vector3 (-0.1f, -0.039f, 0.2f); facingRight = true; } //Move Left + // If BBW is in the air, start to limit movement if (Input.GetKey (moveLeft)) { - if (airMoves == 1) { + if (airMoves == 1) + { transform.Translate (-Vector2.right * speed * Time.deltaTime); - } else if (airMoves > 1) { + } + else if (airMoves > 1) + { transform.Translate (-Vector2.right * (speed / airMoves) * Time.deltaTime); airMoves = airMoves + airMoveIncrement; gameObject.rigidbody2D.gravityScale = gameObject.rigidbody2D.gravityScale + airGravityIncrement; } - + + //Switch to Left Texture, position glow GameObject.Find ("BBW").gameObject.GetComponent ().material.SetTexture ("_MainTex", leftTexture); + glow.transform.localPosition = new Vector3 (0.08f, -0.04f, 0.2f); facingRight = false; } } @@ -124,17 +158,18 @@ void OnTriggerEnter2D(Collider2D other) { if (other.gameObject.tag == "LRRHTrigger") { - if (gameObject.layer == 12) { - - //Jump - if (Input.GetKeyDown (moveJump) || Input.GetButtonUp ("Jump")) { - if (jumpsMade < jumpLimit) { - play.PlayJumpBBW (); - rigidbody2D.AddForce (Vector2.up * jumpHeight); - jumpsMade++; - } - } + glow.renderer.enabled = true; + if (gameObject.layer == 12) { + + //Jump + if (Input.GetKeyDown (moveJump) || Input.GetButtonUp ("Jump")) { + if (jumpsMade < jumpLimit) { + play.PlayJumpBBW (); + rigidbody2D.AddForce (Vector2.up * jumpHeight); + jumpsMade++; } + } + } //Jump if (Input.GetKeyDown (moveJump)) { @@ -160,6 +195,7 @@ void OnTriggerStay2D(Collider2D other) if (other.gameObject.tag == "LRRHTrigger") { + glow.renderer.enabled = true; if (gameObject.layer == 12) { //Jump @@ -190,7 +226,7 @@ void OnTriggerStay2D(Collider2D other) void OnTriggerExit2D(Collider2D other) { - + glow.renderer.enabled = false; if (other.gameObject.tag == "LRRHTrigger") { if (gameObject.layer == 12) diff --git a/Assets/Objects_Characters/Pickup/PickUp.prefab b/Assets/Objects_Characters/Pickup/PickUp.prefab index d3a108c..adcf707 100644 Binary files a/Assets/Objects_Characters/Pickup/PickUp.prefab and b/Assets/Objects_Characters/Pickup/PickUp.prefab differ diff --git a/Assets/Scenes/1.unity b/Assets/Scenes/1.unity index e5be6db..cad7c99 100644 Binary files a/Assets/Scenes/1.unity and b/Assets/Scenes/1.unity differ diff --git a/Library/AssetServerCacheV3 b/Library/AssetServerCacheV3 index 28171ea..e1c3dea 100644 Binary files a/Library/AssetServerCacheV3 and b/Library/AssetServerCacheV3 differ diff --git a/Library/CurrentLayout.dwlt b/Library/CurrentLayout.dwlt index b5c14ff..1715b1f 100644 Binary files a/Library/CurrentLayout.dwlt and b/Library/CurrentLayout.dwlt differ diff --git a/Library/CurrentMaximizeLayout.dwlt b/Library/CurrentMaximizeLayout.dwlt index 4986648..77dd800 100644 Binary files a/Library/CurrentMaximizeLayout.dwlt and b/Library/CurrentMaximizeLayout.dwlt differ diff --git a/Library/ScriptAssemblies/Assembly-CSharp-Editor.dll b/Library/ScriptAssemblies/Assembly-CSharp-Editor.dll index 510510d..7039d6b 100755 Binary files a/Library/ScriptAssemblies/Assembly-CSharp-Editor.dll and b/Library/ScriptAssemblies/Assembly-CSharp-Editor.dll differ diff --git a/Library/ScriptAssemblies/Assembly-CSharp-Editor.dll.mdb b/Library/ScriptAssemblies/Assembly-CSharp-Editor.dll.mdb index 744b942..0c6aee9 100644 Binary files a/Library/ScriptAssemblies/Assembly-CSharp-Editor.dll.mdb and b/Library/ScriptAssemblies/Assembly-CSharp-Editor.dll.mdb differ diff --git a/Library/ScriptAssemblies/Assembly-CSharp.dll b/Library/ScriptAssemblies/Assembly-CSharp.dll index 327aaad..5bc426e 100755 Binary files a/Library/ScriptAssemblies/Assembly-CSharp.dll and b/Library/ScriptAssemblies/Assembly-CSharp.dll differ diff --git a/Library/ScriptAssemblies/Assembly-CSharp.dll.mdb b/Library/ScriptAssemblies/Assembly-CSharp.dll.mdb index a8e9e71..62c016f 100644 Binary files a/Library/ScriptAssemblies/Assembly-CSharp.dll.mdb and b/Library/ScriptAssemblies/Assembly-CSharp.dll.mdb differ diff --git a/Library/assetDatabase3 b/Library/assetDatabase3 index c1eb498..9c4ed38 100644 Binary files a/Library/assetDatabase3 and b/Library/assetDatabase3 differ diff --git a/Library/expandedItems b/Library/expandedItems index e084b8e..59f7cc5 100644 Binary files a/Library/expandedItems and b/Library/expandedItems differ diff --git a/Library/guidmapper b/Library/guidmapper index 9e862da..cd46067 100644 Binary files a/Library/guidmapper and b/Library/guidmapper differ diff --git a/Library/metadata/23/2314ce3a3eecf4816bad3c9eca4de2e1 b/Library/metadata/23/2314ce3a3eecf4816bad3c9eca4de2e1 new file mode 100644 index 0000000..72055ed Binary files /dev/null and b/Library/metadata/23/2314ce3a3eecf4816bad3c9eca4de2e1 differ diff --git a/Library/metadata/3a/3a6b09fe1ede02e47bc66dddc24e8b23 b/Library/metadata/3a/3a6b09fe1ede02e47bc66dddc24e8b23 new file mode 100644 index 0000000..77c667b Binary files /dev/null and b/Library/metadata/3a/3a6b09fe1ede02e47bc66dddc24e8b23 differ diff --git a/Library/metadata/40/40d8d533082629345bef7dd965fbd3fe b/Library/metadata/40/40d8d533082629345bef7dd965fbd3fe new file mode 100644 index 0000000..39efe25 Binary files /dev/null and b/Library/metadata/40/40d8d533082629345bef7dd965fbd3fe differ diff --git a/Library/metadata/49/491c7d77f986244fb9e96434c4e82dae b/Library/metadata/49/491c7d77f986244fb9e96434c4e82dae index 3423dc4..52c704b 100644 Binary files a/Library/metadata/49/491c7d77f986244fb9e96434c4e82dae and b/Library/metadata/49/491c7d77f986244fb9e96434c4e82dae differ diff --git a/Library/metadata/70/7068d080e9d2e4a2b93a0e0c3a934f2c b/Library/metadata/70/7068d080e9d2e4a2b93a0e0c3a934f2c index d1d6854..bc0545a 100644 Binary files a/Library/metadata/70/7068d080e9d2e4a2b93a0e0c3a934f2c and b/Library/metadata/70/7068d080e9d2e4a2b93a0e0c3a934f2c differ diff --git a/Library/metadata/7f/7f8eb66de2b5c444a9ce6e7a76b665b2 b/Library/metadata/8f/8f16558f860ff4e77ab9e12c75892846 similarity index 89% rename from Library/metadata/7f/7f8eb66de2b5c444a9ce6e7a76b665b2 rename to Library/metadata/8f/8f16558f860ff4e77ab9e12c75892846 index 44463db..4ad95ee 100644 Binary files a/Library/metadata/7f/7f8eb66de2b5c444a9ce6e7a76b665b2 and b/Library/metadata/8f/8f16558f860ff4e77ab9e12c75892846 differ diff --git a/LudumDare31-csharp.sln b/LudumDare31-csharp.sln index 96fee59..285fb2c 100644 --- a/LudumDare31-csharp.sln +++ b/LudumDare31-csharp.sln @@ -29,7 +29,7 @@ Global GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection - GlobalSection(MonoDevelopProperties) = preSolution + GlobalSection(MonoDevelopProperties) = preSolution ======= GlobalSection(MonoDevelopProperties) = preSolution >>>>>>> Stashed changes diff --git a/LudumDare31.sln b/LudumDare31.sln index ee2743d..2a1de9f 100644 --- a/LudumDare31.sln +++ b/LudumDare31.sln @@ -35,7 +35,7 @@ Global GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection - GlobalSection(MonoDevelopProperties) = preSolution + GlobalSection(MonoDevelopProperties) = preSolution ======= GlobalSection(MonoDevelopProperties) = preSolution >>>>>>> Stashed changes diff --git a/LudumDare31.userprefs b/LudumDare31.userprefs index ddf9f4d..48bb424 100644 --- a/LudumDare31.userprefs +++ b/LudumDare31.userprefs @@ -1,9 +1,12 @@  - + - - + + + + + diff --git a/ProjectSettings/TagManager.asset b/ProjectSettings/TagManager.asset index c3c17a9..4bd0396 100644 Binary files a/ProjectSettings/TagManager.asset and b/ProjectSettings/TagManager.asset differ