change: Added second level to MushroomVillage and implemented jump pads

This commit is contained in:
Nicholas Novak 2023-05-04 20:25:44 -07:00
parent 6ac28f4560
commit 97419d36de
6 changed files with 4003 additions and 1800 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,23 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Bouncepad : MonoBehaviour
{
public enum Facing
{
Left,
Right,
}
[SerializeField]
Facing bounceDirection = Facing.Left;
[SerializeField]
public float bounceForce = 20f;
public Facing Direction()
{
return this.bounceDirection;
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 1f75445772cf608f6a46acd7fd8dd323
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -292,6 +292,27 @@ public class PlayerBehavior : MonoBehaviour
isInWater = true;
Water();
}
else if (col.tag == "bouncePad")
{
// Assign the player's velocity to zero so that the player can
// bounce on the same jump pad
this.playerController.RB.velocity = new Vector2(
this.playerController.RB.velocity.x,
0
);
Bouncepad pad = col.GetComponent<Bouncepad>();
switch (pad.Direction())
{
case Bouncepad.Facing.Left:
this.playerController.RB.AddForce(
new Vector2(-pad.bounceForce, pad.bounceForce),
ForceMode2D.Impulse
);
break;
case Bouncepad.Facing.Right:
break;
}
}
}
void OnTriggerExit2D(Collider2D col)
@ -367,7 +388,8 @@ public class PlayerBehavior : MonoBehaviour
// this.stateController.SetDeathCanvasActive(true);
if (grapplingRope.isGrappling) {
if (grapplingRope.isGrappling)
{
LetGoOfGrapple();
}

View File

@ -2142,6 +2142,26 @@ Tilemap:
m_TileObjectToInstantiateIndex: 65535
dummyAlignment: 0
m_AllTileFlags: 1073741825
- first: {x: -7, y: -1, z: 0}
second:
serializedVersion: 2
m_TileIndex: 16
m_TileSpriteIndex: 17
m_TileMatrixIndex: 2
m_TileColorIndex: 0
m_TileObjectToInstantiateIndex: 65535
dummyAlignment: 0
m_AllTileFlags: 1073741825
- first: {x: -6, y: -1, z: 0}
second:
serializedVersion: 2
m_TileIndex: 17
m_TileSpriteIndex: 16
m_TileMatrixIndex: 2
m_TileColorIndex: 0
m_TileObjectToInstantiateIndex: 65535
dummyAlignment: 0
m_AllTileFlags: 1073741825
- first: {x: -5, y: -1, z: 0}
second:
serializedVersion: 2
@ -2302,6 +2322,26 @@ Tilemap:
m_TileObjectToInstantiateIndex: 65535
dummyAlignment: 0
m_AllTileFlags: 1073741825
- first: {x: -7, y: 0, z: 0}
second:
serializedVersion: 2
m_TileIndex: 28
m_TileSpriteIndex: 28
m_TileMatrixIndex: 2
m_TileColorIndex: 0
m_TileObjectToInstantiateIndex: 65535
dummyAlignment: 0
m_AllTileFlags: 1073741825
- first: {x: -6, y: 0, z: 0}
second:
serializedVersion: 2
m_TileIndex: 29
m_TileSpriteIndex: 29
m_TileMatrixIndex: 2
m_TileColorIndex: 0
m_TileObjectToInstantiateIndex: 65535
dummyAlignment: 0
m_AllTileFlags: 1073741825
- first: {x: -2, y: 0, z: 0}
second:
serializedVersion: 2
@ -2606,9 +2646,9 @@ Tilemap:
m_Data: {fileID: 11400000, guid: 2b480e4f3cf59c64f9f7f3eb2ae32a43, type: 2}
- m_RefCount: 1
m_Data: {fileID: 11400000, guid: fb5e78b3e23ccbf1782b4944bdf250e9, type: 2}
- m_RefCount: 1
- m_RefCount: 2
m_Data: {fileID: 11400000, guid: 2a6878e04a2be83d1bbb2faa1f90f7cb, type: 2}
- m_RefCount: 1
- m_RefCount: 2
m_Data: {fileID: 11400000, guid: 29eb8338dc97002f5971ed102ab579dd, type: 2}
- m_RefCount: 1
m_Data: {fileID: 11400000, guid: fd746402750f60e8983e77edfcbbb8fa, type: 2}
@ -2630,9 +2670,9 @@ Tilemap:
m_Data: {fileID: 11400000, guid: a06c7232d556c906f83884df6d40e109, type: 2}
- m_RefCount: 2
m_Data: {fileID: 11400000, guid: 29d5dd975f4e7a027b8dfc0440618bc5, type: 2}
- m_RefCount: 1
- m_RefCount: 2
m_Data: {fileID: 11400000, guid: 180d8d893c440c261a1ef4d801707bcd, type: 2}
- m_RefCount: 1
- m_RefCount: 2
m_Data: {fileID: 11400000, guid: 2c74b192dbfb7f32ca36fd822a329b7c, type: 2}
- m_RefCount: 1
m_Data: {fileID: 11400000, guid: 8aeb41697f5624d9da439dbaf9134e7d, type: 2}
@ -3105,9 +3145,9 @@ Tilemap:
m_Data: {fileID: 1509828166, guid: 577ba1ea470cbfb068f24f10dcee1629, type: 3}
- m_RefCount: 1
m_Data: {fileID: 18313309, guid: 577ba1ea470cbfb068f24f10dcee1629, type: 3}
- m_RefCount: 1
- m_RefCount: 2
m_Data: {fileID: -351428361, guid: 577ba1ea470cbfb068f24f10dcee1629, type: 3}
- m_RefCount: 1
- m_RefCount: 2
m_Data: {fileID: -1622023099, guid: 577ba1ea470cbfb068f24f10dcee1629, type: 3}
- m_RefCount: 1
m_Data: {fileID: -1014787237, guid: 577ba1ea470cbfb068f24f10dcee1629, type: 3}
@ -3129,9 +3169,9 @@ Tilemap:
m_Data: {fileID: 870125656, guid: 577ba1ea470cbfb068f24f10dcee1629, type: 3}
- m_RefCount: 2
m_Data: {fileID: -1104956726, guid: 577ba1ea470cbfb068f24f10dcee1629, type: 3}
- m_RefCount: 1
- m_RefCount: 2
m_Data: {fileID: -35684010, guid: 577ba1ea470cbfb068f24f10dcee1629, type: 3}
- m_RefCount: 1
- m_RefCount: 2
m_Data: {fileID: -721828406, guid: 577ba1ea470cbfb068f24f10dcee1629, type: 3}
- m_RefCount: 1
m_Data: {fileID: 1362856338, guid: 577ba1ea470cbfb068f24f10dcee1629, type: 3}
@ -3608,32 +3648,32 @@ Tilemap:
e31: 0
e32: 0
e33: 1
- m_RefCount: 0
- m_RefCount: 4
m_Data:
e00: 1.7399998
e01: 0.00000008742278
e02: 0
e00: 1
e01: -0.00000008742278
e02: -0.00000008742278
e03: 0
e10: -0
e11: 0.000000059604645
e12: 0.99999994
e10: -0.00000008742278
e11: -1
e12: 0
e13: 0
e20: -0.00000015211563
e21: 0.99999994
e22: 0.000000059604645
e20: -0.00000008742278
e21: 7.642742e-15
e22: -1
e23: 0
e30: 0
e31: 0
e32: 0
e33: 1
m_TileColorArray:
- m_RefCount: 253
- m_RefCount: 257
m_Data: {r: 1, g: 1, b: 1, a: 1}
m_TileObjectToInstantiateArray: []
m_AnimationFrameRate: 1
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_Origin: {x: -5, y: -16, z: 0}
m_Size: {x: 24, y: 18, z: 1}
m_Origin: {x: -7, y: -16, z: 0}
m_Size: {x: 26, y: 18, z: 1}
m_TileAnchor: {x: 0.5, y: 0.5, z: 0}
m_TileOrientation: 0
m_TileOrientationMatrix:
@ -3747,7 +3787,7 @@ Grid:
m_CellGap: {x: 0, y: 0, z: 0}
m_CellLayout: 0
m_CellSwizzle: 0
--- !u!114 &5206389324278009406
--- !u!114 &5221619334121491998
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}

View File

@ -23,6 +23,7 @@ TagManager:
- GameUICanvas
- bouncy
- water
- bouncePad
layers:
- Default
- TransparentFX