Compare commits

...

2 Commits

Author SHA1 Message Date
haitem
129a7391aa Merge branch 'master' of https://git.steelants.cz/GJP/GlobalGameJam-2021 2021-01-31 14:34:59 +01:00
haitem
c14744d22f Remake Hans scene 2021-01-31 14:34:49 +01:00
5 changed files with 111 additions and 2203 deletions

File diff suppressed because it is too large Load Diff

View File

@ -84,7 +84,7 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
objectType: 2 objectType: 2
instaKill: 0 instaKill: 1
damage: 10 damage: 10
damageRate: 5 damageRate: 5
fromPosition: {fileID: 0} fromPosition: {fileID: 0}

View File

@ -550,6 +550,87 @@ MeshFilter:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 299738518} m_GameObject: {fileID: 299738518}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!1001 &313720473
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 4992519963305423117, guid: ba918907807ecda4982b8c9ca799aa42,
type: 3}
propertyPath: m_RootOrder
value: 2
objectReference: {fileID: 0}
- target: {fileID: 4992519963305423117, guid: ba918907807ecda4982b8c9ca799aa42,
type: 3}
propertyPath: m_LocalPosition.x
value: 0.60599995
objectReference: {fileID: 0}
- target: {fileID: 4992519963305423117, guid: ba918907807ecda4982b8c9ca799aa42,
type: 3}
propertyPath: m_LocalPosition.y
value: -0.13800025
objectReference: {fileID: 0}
- target: {fileID: 4992519963305423117, guid: ba918907807ecda4982b8c9ca799aa42,
type: 3}
propertyPath: m_LocalPosition.z
value: 0.6000004
objectReference: {fileID: 0}
- target: {fileID: 4992519963305423117, guid: ba918907807ecda4982b8c9ca799aa42,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4992519963305423117, guid: ba918907807ecda4982b8c9ca799aa42,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4992519963305423117, guid: ba918907807ecda4982b8c9ca799aa42,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4992519963305423117, guid: ba918907807ecda4982b8c9ca799aa42,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4992519963305423117, guid: ba918907807ecda4982b8c9ca799aa42,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4992519963305423117, guid: ba918907807ecda4982b8c9ca799aa42,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4992519963305423117, guid: ba918907807ecda4982b8c9ca799aa42,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6250588316959267219, guid: ba918907807ecda4982b8c9ca799aa42,
type: 3}
propertyPath: m_Name
value: Gui
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: ba918907807ecda4982b8c9ca799aa42, type: 3}
--- !u!114 &313720474 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 8686362966973903153, guid: ba918907807ecda4982b8c9ca799aa42,
type: 3}
m_PrefabInstance: {fileID: 313720473}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1001 &332309331 --- !u!1001 &332309331
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -1750,89 +1831,6 @@ Transform:
type: 3} type: 3}
m_PrefabInstance: {fileID: 1018104009} m_PrefabInstance: {fileID: 1018104009}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
--- !u!1 &1025240044
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1025240047}
- component: {fileID: 1025240046}
- component: {fileID: 1025240045}
m_Layer: 0
m_Name: Main Camera
m_TagString: MainCamera
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!81 &1025240045
AudioListener:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1025240044}
m_Enabled: 1
--- !u!20 &1025240046
Camera:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1025240044}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 1
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
m_projectionMatrixMode: 1
m_GateFitMode: 2
m_FOVAxisMode: 0
m_SensorSize: {x: 36, y: 24}
m_LensShift: {x: 0, y: 0}
m_FocalLength: 50
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
near clip plane: 0.3
far clip plane: 1000
field of view: 60
orthographic: 0
orthographic size: 5
m_Depth: -1
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingPath: -1
m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0
m_TargetEye: 3
m_HDR: 1
m_AllowMSAA: 1
m_AllowDynamicResolution: 0
m_ForceIntoRT: 0
m_OcclusionCulling: 1
m_StereoConvergence: 10
m_StereoSeparation: 0.022
--- !u!4 &1025240047
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1025240044}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 1, z: -10}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1114277846 --- !u!1 &1114277846
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -1860,8 +1858,8 @@ Transform:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1114277846} m_GameObject: {fileID: 1114277846}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -4, y: 3.5, z: 0} m_LocalPosition: {x: -4, y: 3.73, z: 0}
m_LocalScale: {x: 2, y: 5, z: 2} m_LocalScale: {x: 2, y: 4.6, z: 2}
m_Children: [] m_Children: []
m_Father: {fileID: 1784024229} m_Father: {fileID: 1784024229}
m_RootOrder: 2 m_RootOrder: 2
@ -1933,6 +1931,11 @@ PrefabInstance:
m_Modification: m_Modification:
m_TransformParent: {fileID: 1923174388} m_TransformParent: {fileID: 1923174388}
m_Modifications: m_Modifications:
- target: {fileID: 2773067093461657725, guid: 712671f8cf5fa684cbcb1159d45b0057,
type: 3}
propertyPath: nextSceneName
value: FinalMenu
objectReference: {fileID: 0}
- target: {fileID: 2773067093461657726, guid: 712671f8cf5fa684cbcb1159d45b0057, - target: {fileID: 2773067093461657726, guid: 712671f8cf5fa684cbcb1159d45b0057,
type: 3} type: 3}
propertyPath: m_RootOrder propertyPath: m_RootOrder
@ -2028,8 +2031,8 @@ Transform:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1275385513} m_GameObject: {fileID: 1275385513}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 2.48, y: 1.98, z: 0} m_LocalPosition: {x: 2.48, y: 2.07, z: 0}
m_LocalScale: {x: 2.8177178, y: 1.8602351, z: 2.0518} m_LocalScale: {x: 2.8177178, y: 1.5, z: 2.0518}
m_Children: [] m_Children: []
m_Father: {fileID: 1784024229} m_Father: {fileID: 1784024229}
m_RootOrder: 4 m_RootOrder: 4
@ -3111,10 +3114,15 @@ PrefabInstance:
propertyPath: m_Name propertyPath: m_Name
value: Player value: Player
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 7094923891560833916, guid: e4d82994b58b7304b91c915c597b71f8,
type: 3}
propertyPath: powerImage
value:
objectReference: {fileID: 313720474}
- target: {fileID: 7094923891560833917, guid: e4d82994b58b7304b91c915c597b71f8, - target: {fileID: 7094923891560833917, guid: e4d82994b58b7304b91c915c597b71f8,
type: 3} type: 3}
propertyPath: m_RootOrder propertyPath: m_RootOrder
value: 2 value: 1
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 7094923891560833917, guid: e4d82994b58b7304b91c915c597b71f8, - target: {fileID: 7094923891560833917, guid: e4d82994b58b7304b91c915c597b71f8,
type: 3} type: 3}
@ -3579,7 +3587,7 @@ PrefabInstance:
- target: {fileID: 1593063039033634447, guid: 2d077f1b027540045b6833e51a067855, - target: {fileID: 1593063039033634447, guid: 2d077f1b027540045b6833e51a067855,
type: 3} type: 3}
propertyPath: m_RootOrder propertyPath: m_RootOrder
value: 1 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 1593063039033634447, guid: 2d077f1b027540045b6833e51a067855, - target: {fileID: 1593063039033634447, guid: 2d077f1b027540045b6833e51a067855,
type: 3} type: 3}
@ -3665,8 +3673,8 @@ Transform:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1883140474} m_GameObject: {fileID: 1883140474}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0.55, y: -2, z: 0} m_LocalPosition: {x: 0.55, y: -1.74, z: 0}
m_LocalScale: {x: 11, y: 2, z: 2} m_LocalScale: {x: 11, y: 1.5, z: 2}
m_Children: [] m_Children: []
m_Father: {fileID: 1784024229} m_Father: {fileID: 1784024229}
m_RootOrder: 1 m_RootOrder: 1

View File

@ -29,7 +29,7 @@ public class PlayerManager : MonoBehaviour
private GameObject pushPullObject; private GameObject pushPullObject;
private float pushPullObjectDistance; private float pushPullObjectDistance;
public float dashPower = 40f; public float dashPower = 40f;
public float dashTime = 0.3f; public float dashTime = 0.4f;
private float actualDashTime; private float actualDashTime;
private int dashButton; private int dashButton;
private bool dash = false; private bool dash = false;
@ -116,7 +116,7 @@ public class PlayerManager : MonoBehaviour
private void FixedUpdate() private void FixedUpdate()
{ {
if (!cannotMove && !onLadder) if (!cannotMove && (!onLadder || (onLadder && (activeAbility.Count < 0 || activeAbility[0] != 4))))
{ {
Jump(); Jump();
FindObjectOfType<AudioManager>().Play("Jump"); FindObjectOfType<AudioManager>().Play("Jump");
@ -278,20 +278,18 @@ public class PlayerManager : MonoBehaviour
void Move() void Move()
{ {
if (onGround || (onLadder && activeAbility.Count > 0 && activeAbility[0] == 4)) { rigidBody.MovePosition(
rigidBody.MovePosition( transform.position +
transform.position + (onLadder && activeAbility.Count > 0 && activeAbility[0] == 4 ? (transform.up * speed * Input.GetAxis("Vertical") * Time.deltaTime) : Vector3.zero) +
(onLadder && activeAbility.Count > 0 && activeAbility[0] == 4 ? (transform.up * speed * Input.GetAxis("Vertical") * Time.deltaTime) : Vector3.zero) + (transform.right * (run ? runSpeed : speed) * Input.GetAxis("Horizontal") * Time.deltaTime)
(transform.right * (run ? runSpeed : speed) * Input.GetAxis("Horizontal") * Time.deltaTime) );;
);;
}
} }
void Jump() void Jump()
{ {
if (Input.GetAxisRaw("Jump") > 0) if (Input.GetAxisRaw("Jump") > 0)
{ {
if (rigidBody.velocity.y <= 1 && (onGround || (dubleJump && activeAbility.Count > 0 && activeAbility[0] == 1))) if (rigidBody.velocity.y <= 1 && (onGround || (dubleJump && activeAbility.Count > 0 && activeAbility[0] == 1)) )
{ {
if (!onGround) if (!onGround)
{ {
@ -299,7 +297,6 @@ public class PlayerManager : MonoBehaviour
} }
pushPullObject = null; pushPullObject = null;
rigidBody.AddForce( rigidBody.AddForce(
(transform.right * (run ? runSpeed : speed) * 5 * Input.GetAxis("Horizontal") * Time.deltaTime) +
(transform.up * jump * 10 * Time.deltaTime), (transform.up * jump * 10 * Time.deltaTime),
ForceMode.VelocityChange ForceMode.VelocityChange
); );
@ -420,25 +417,9 @@ public class PlayerManager : MonoBehaviour
{ {
if (other.tag == "Ground" || other.tag == "Objects") if (other.tag == "Ground" || other.tag == "Objects")
{ {
if (!onLadder) {
rigidBody.AddForce(
(transform.right * (run ? runSpeed : speed) * 5 * Input.GetAxis("Horizontal") * Time.deltaTime) +
(transform.up * 10 * Time.deltaTime),
ForceMode.VelocityChange
);
}
onGround = false; onGround = false;
dash = false; dash = false;
} }
if (other.gameObject.GetComponent<ObjectManager>() != null)
{
if (other.gameObject.GetComponent<ObjectManager>().objectType == ObjectManager.ObjectType.Ladder) {
rigidBody.AddForce(
(transform.right * (run ? runSpeed : speed) * 2.5f * Input.GetAxis("Horizontal") * Time.deltaTime),
ForceMode.VelocityChange
);
}
}
if (other.gameObject.GetComponent<PowerCubeManager>() != null) if (other.gameObject.GetComponent<PowerCubeManager>() != null)
{ {
interact = false; interact = false;

View File

@ -11,6 +11,9 @@ EditorBuildSettings:
- enabled: 1 - enabled: 1
path: Assets/Scenes/Levels/Level1_Release.unity path: Assets/Scenes/Levels/Level1_Release.unity
guid: 326dea585e0ea574389529eaae8a0ab4 guid: 326dea585e0ea574389529eaae8a0ab4
- enabled: 1
path: Assets/Scenes/Levels/Hans.unity
guid: 5bd5cae5450d4864e9aa9a1fcc849adb
- enabled: 1 - enabled: 1
path: Assets/Scenes/Menu/FinalMenu.unity path: Assets/Scenes/Menu/FinalMenu.unity
guid: e728960f94bcba84089c530dec85aa8d guid: e728960f94bcba84089c530dec85aa8d