Commit b5a9331b authored by mthiele2's avatar mthiele2

You were my sun, you were my earth

But you didn't know all the ways I loved you, no
So you took a chance, made other plans
But I bet you didn't think that they would come crashing down, no
You don't have to say, what you did
I already know, I found out from him
Now there's just no chance
With you and me
There'll never be
Don't it make you sad about it?
You told me you love me
Why did you leave me all alone
Now you tell me you need me
When you call me on the phone
Girl, I refuse
You must have me confused with some other guy
The bridges were burned
Now it's your turn, to cry
Cry me a river
Cry me a river
Cry me a river
Cry me a river
parent 84b8570a
......@@ -49,11 +49,11 @@ MonoBehaviour:
mass: 1
gravity: 3
defaultMoveState:
jumpForce: 0
smoothing: 0
airControl: 0
canSwim: 0
moveSpeed: 0
maxJumpCount: 0
mass: 0
gravity: 0
jumpForce: 15
smoothing: 0.03
airControl: 1
canSwim: 1
moveSpeed: 30
maxJumpCount: 1
mass: 1
gravity: 3
......@@ -966,8 +966,8 @@ SpriteShapeRenderer:
- {fileID: 0}
- {fileID: 0}
m_LocalAABB:
m_Center: {x: -16.56232, y: 0.71152323, z: -0.0005}
m_Extent: {x: 3.5234857, y: 0.65092105, z: 0.0005}
m_Center: {x: -16.599163, y: 0.7159641, z: -0.0005}
m_Extent: {x: 3.560328, y: 0.6553619, z: 0.0005}
--- !u!4 &153492802
Transform:
m_ObjectHideFlags: 0
......@@ -2311,7 +2311,7 @@ Transform:
- {fileID: 204803661}
- {fileID: 1401599868}
m_Father: {fileID: 0}
m_RootOrder: 24
m_RootOrder: 25
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &332050589
GameObject:
......@@ -2666,8 +2666,8 @@ SpriteShapeRenderer:
- {fileID: 0}
- {fileID: 0}
m_LocalAABB:
m_Center: {x: 4.109063, y: 0.1840193, z: -0.0005}
m_Extent: {x: 2.6312635, y: 0.5959016, z: 0.0005}
m_Center: {x: 4.072424, y: 0.1840193, z: -0.0005}
m_Extent: {x: 2.667903, y: 0.5959016, z: 0.0005}
--- !u!4 &340767519
Transform:
m_ObjectHideFlags: 0
......@@ -3592,9 +3592,9 @@ SpriteShapeRenderer:
m_ShapeTexture: {fileID: 2800000, guid: ba99f04fad336dc4cae4bc02a82688c1, type: 3}
m_Sprites:
- {fileID: 21300000, guid: 13ab9aadcc474c54fa0e5e1357839339, type: 3}
- {fileID: 21300000, guid: e876b7a7d77efce479e91dd5bdd9c801, type: 3}
- {fileID: 21300000, guid: 8e00a1a482dd4b246b7304f2b325dc1f, type: 3}
- {fileID: 21300000, guid: 7a6e3bcd9bf346243afec76782b04456, type: 3}
- {fileID: 21300000, guid: ba99f04fad336dc4cae4bc02a82688c1, type: 3}
- {fileID: 21300000, guid: ba99f04fad336dc4cae4bc02a82688c1, type: 3}
- {fileID: 21300000, guid: ba99f04fad336dc4cae4bc02a82688c1, type: 3}
- {fileID: 21300000, guid: 7a33ec8d81f8de84e9bcee25c84a0a68, type: 3}
- {fileID: 21300000, guid: 12ccb39abf7fdde4489b45f7dc2ddb95, type: 3}
- {fileID: 21300000, guid: 32f1aa5b812a2a349afca26ff07162f8, type: 3}
......@@ -3604,8 +3604,8 @@ SpriteShapeRenderer:
- {fileID: 0}
- {fileID: 0}
m_LocalAABB:
m_Center: {x: -73.73411, y: 30.848034, z: -0.0075000003}
m_Extent: {x: 41.39833, y: 13.268495, z: 0.0075000003}
m_Center: {x: -73.73873, y: 30.833725, z: -0.0075000003}
m_Extent: {x: 41.417297, y: 13.285489, z: 0.0075000003}
--- !u!4 &438036707
Transform:
m_ObjectHideFlags: 0
......@@ -4224,8 +4224,8 @@ SpriteShapeRenderer:
- {fileID: 0}
- {fileID: 0}
m_LocalAABB:
m_Center: {x: 1.3887328, y: 0.17776741, z: -0.0005}
m_Extent: {x: 1.558709, y: 0.5780626, z: 0.0005}
m_Center: {x: 1.3516383, y: 0.17799477, z: -0.0005}
m_Extent: {x: 1.5958035, y: 0.5782899, z: 0.0005}
--- !u!4 &445399089
Transform:
m_ObjectHideFlags: 0
......@@ -4827,6 +4827,85 @@ PrefabInstance:
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 2e3528907311e438dab0d393127aa332, type: 3}
--- !u!1001 &552587486
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 1648869877852930880, guid: 4512b8eb550115443bbba2ecd59a960c,
type: 3}
propertyPath: m_Name
value: EarthElement
objectReference: {fileID: 0}
- target: {fileID: 5794390821522793468, guid: 4512b8eb550115443bbba2ecd59a960c,
type: 3}
propertyPath: m_LocalPosition.x
value: 51.50274
objectReference: {fileID: 0}
- target: {fileID: 5794390821522793468, guid: 4512b8eb550115443bbba2ecd59a960c,
type: 3}
propertyPath: m_LocalPosition.y
value: 37.270752
objectReference: {fileID: 0}
- target: {fileID: 5794390821522793468, guid: 4512b8eb550115443bbba2ecd59a960c,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5794390821522793468, guid: 4512b8eb550115443bbba2ecd59a960c,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5794390821522793468, guid: 4512b8eb550115443bbba2ecd59a960c,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5794390821522793468, guid: 4512b8eb550115443bbba2ecd59a960c,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5794390821522793468, guid: 4512b8eb550115443bbba2ecd59a960c,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5794390821522793468, guid: 4512b8eb550115443bbba2ecd59a960c,
type: 3}
propertyPath: m_RootOrder
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5794390821522793468, guid: 4512b8eb550115443bbba2ecd59a960c,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5794390821522793468, guid: 4512b8eb550115443bbba2ecd59a960c,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5794390821522793468, guid: 4512b8eb550115443bbba2ecd59a960c,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2918200888185297756, guid: 4512b8eb550115443bbba2ecd59a960c,
type: 3}
propertyPath: m_SortingLayerID
value: 1206248169
objectReference: {fileID: 0}
- target: {fileID: 2918200888185297756, guid: 4512b8eb550115443bbba2ecd59a960c,
type: 3}
propertyPath: m_SortingLayer
value: 3
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 4512b8eb550115443bbba2ecd59a960c, type: 3}
--- !u!1 &567854872
GameObject:
m_ObjectHideFlags: 0
......@@ -5863,7 +5942,7 @@ Transform:
- {fileID: 209128644}
- {fileID: 1373053038}
m_Father: {fileID: 0}
m_RootOrder: 20
m_RootOrder: 21
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &670026445
GameObject:
......@@ -7333,7 +7412,7 @@ Transform:
- {fileID: 635980250}
- {fileID: 632331631}
m_Father: {fileID: 0}
m_RootOrder: 25
m_RootOrder: 26
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &779134158
PrefabInstance:
......@@ -7479,12 +7558,12 @@ PrefabInstance:
- target: {fileID: 8746327460217138312, guid: 615b74be12ac7ec4e9b491a7ef5cbbe1,
type: 3}
propertyPath: m_LocalPosition.x
value: 51.490097
value: 52.72
objectReference: {fileID: 0}
- target: {fileID: 8746327460217138312, guid: 615b74be12ac7ec4e9b491a7ef5cbbe1,
type: 3}
propertyPath: m_LocalPosition.y
value: 37.245506
value: 37.19
objectReference: {fileID: 0}
- target: {fileID: 8746327460217138312, guid: 615b74be12ac7ec4e9b491a7ef5cbbe1,
type: 3}
......@@ -7685,7 +7764,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 18
m_RootOrder: 19
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!68 &852283145
EdgeCollider2D:
......@@ -7770,7 +7849,7 @@ Transform:
m_Children:
- {fileID: 399322774}
m_Father: {fileID: 0}
m_RootOrder: 23
m_RootOrder: 24
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &924553758
GameObject:
......@@ -7839,7 +7918,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 16
m_RootOrder: 17
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
--- !u!1 &933700279
GameObject:
......@@ -8193,12 +8272,12 @@ PrefabInstance:
- target: {fileID: 1430575287304331681, guid: e79fbf1855fce6e4387f467f1fb65960,
type: 3}
propertyPath: m_LocalPosition.x
value: 54.123108
value: 55.35
objectReference: {fileID: 0}
- target: {fileID: 1430575287304331681, guid: e79fbf1855fce6e4387f467f1fb65960,
type: 3}
propertyPath: m_LocalPosition.y
value: 37.384453
value: 37.06
objectReference: {fileID: 0}
- target: {fileID: 1430575287304331681, guid: e79fbf1855fce6e4387f467f1fb65960,
type: 3}
......@@ -9411,8 +9490,8 @@ SpriteShapeRenderer:
- {fileID: 0}
- {fileID: 0}
m_LocalAABB:
m_Center: {x: 2.1505816, y: 0.26815712, z: -0.0005}
m_Extent: {x: 0.77252907, y: 0.47088587, z: 0.0005}
m_Center: {x: 2.1134744, y: 0.2679473, z: -0.0005}
m_Extent: {x: 0.8096365, y: 0.4710957, z: 0.0005}
--- !u!4 &1277712193
Transform:
m_ObjectHideFlags: 0
......@@ -10163,7 +10242,7 @@ GameObject:
- component: {fileID: 1373053037}
- component: {fileID: 1373053036}
- component: {fileID: 1373053035}
m_Layer: 0
m_Layer: 9
m_Name: SpriteShape (10)
m_TagString: Untagged
m_Icon: {fileID: 0}
......@@ -11588,12 +11667,12 @@ PrefabInstance:
- target: {fileID: 3969804830442744035, guid: 599519593b27fd2448e33dcb9f69045b,
type: 3}
propertyPath: m_LocalPosition.x
value: 52.722183
value: 54.06
objectReference: {fileID: 0}
- target: {fileID: 3969804830442744035, guid: 599519593b27fd2448e33dcb9f69045b,
type: 3}
propertyPath: m_LocalPosition.y
value: 37.357513
value: 37.14
objectReference: {fileID: 0}
- target: {fileID: 3969804830442744035, guid: 599519593b27fd2448e33dcb9f69045b,
type: 3}
......@@ -12274,7 +12353,7 @@ Transform:
- {fileID: 431282940}
- {fileID: 1259848381}
m_Father: {fileID: 0}
m_RootOrder: 21
m_RootOrder: 22
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1617519066
GameObject:
......@@ -13462,12 +13541,12 @@ PrefabInstance:
- target: {fileID: 52145075018362285, guid: 2e3528907311e438dab0d393127aa332,
type: 3}
propertyPath: m_LocalPosition.x
value: 49.93
value: 49.16
objectReference: {fileID: 0}
- target: {fileID: 52145075018362285, guid: 2e3528907311e438dab0d393127aa332,
type: 3}
propertyPath: m_LocalPosition.y
value: 38.32
value: 37.73
objectReference: {fileID: 0}
- target: {fileID: 52145075018362285, guid: 2e3528907311e438dab0d393127aa332,
type: 3}
......@@ -13829,8 +13908,8 @@ SpriteShapeRenderer:
- {fileID: 0}
- {fileID: 0}
m_LocalAABB:
m_Center: {x: 2.2824152, y: 0.10769799, z: -0.0005}
m_Extent: {x: 0.666239, y: 0.50786304, z: 0.0005}
m_Center: {x: 2.2453117, y: 0.10796574, z: -0.0005}
m_Extent: {x: 0.7033424, y: 0.5081308, z: 0.0005}
--- !u!4 &1813771413
Transform:
m_ObjectHideFlags: 0
......@@ -14009,8 +14088,8 @@ SpriteShapeRenderer:
- {fileID: 0}
- {fileID: 0}
m_LocalAABB:
m_Center: {x: 2.2178905, y: 0.05501546, z: -0.0005}
m_Extent: {x: 0.72968596, y: 0.49234754, z: 0.0005}
m_Center: {x: 2.1809688, y: 0.05501546, z: -0.0005}
m_Extent: {x: 0.7666077, y: 0.49234754, z: 0.0005}
--- !u!4 &1836249943
Transform:
m_ObjectHideFlags: 0
......@@ -14198,8 +14277,8 @@ SpriteShapeRenderer:
- {fileID: 0}
- {fileID: 0}
m_LocalAABB:
m_Center: {x: -17.709002, y: 0.29260665, z: -0.0005}
m_Extent: {x: 2.6260943, y: 1.0470328, z: 0.0005}
m_Center: {x: -17.745796, y: 0.29742897, z: -0.0005}
m_Extent: {x: 2.662889, y: 1.0518551, z: 0.0005}
--- !u!4 &1838618330
Transform:
m_ObjectHideFlags: 0
......@@ -14558,8 +14637,8 @@ SpriteShapeRenderer:
- {fileID: 0}
- {fileID: 0}
m_LocalAABB:
m_Center: {x: 4.264027, y: -0.09961374, z: -0.0005}
m_Extent: {x: 1.7159594, y: 0.44942266, z: 0.0005}
m_Center: {x: 4.2269263, y: -0.09962329, z: -0.0005}
m_Extent: {x: 1.7530605, y: 0.4494131, z: 0.0005}
--- !u!4 &1901707170
Transform:
m_ObjectHideFlags: 0
......@@ -14848,7 +14927,7 @@ GameObject:
m_Component:
- component: {fileID: 1963318615}
- component: {fileID: 1963318614}
m_Layer: 0
m_Layer: 9
m_Name: Background
m_TagString: Untagged
m_Icon: {fileID: 0}
......@@ -14915,7 +14994,7 @@ Transform:
m_LocalScale: {x: 11.208771, y: 11.627551, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 22
m_RootOrder: 23
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &2001224420
GameObject:
......@@ -15081,8 +15160,8 @@ SpriteShapeRenderer:
- {fileID: 0}
- {fileID: 0}
m_LocalAABB:
m_Center: {x: -18.578175, y: 0.71147066, z: -0.0005}
m_Extent: {x: 1.8741198, y: 0.7551876, z: 0.0005}
m_Center: {x: -18.608807, y: 0.7324173, z: -0.0005}
m_Extent: {x: 1.9047518, y: 0.7761342, z: 0.0005}
--- !u!4 &2001224424
Transform:
m_ObjectHideFlags: 0
......
......@@ -6,7 +6,7 @@ namespace _Game.Scripts.Player.PlayerAttacks.Earth
public class PlayerEarthAttack : MonoBehaviour
{
private float nextFire;
public float Cooldown;
public float cooldown;
public float massIncrease;
public bool isStomping;
MovementController controller;
......@@ -21,17 +21,39 @@ namespace _Game.Scripts.Player.PlayerAttacks.Earth
{
controller = GetComponentInParent<MovementController>();
contactFilter2D.SetLayerMask(whatIsDestroyable);
_ready = true;
_activated = false;
}
public bool Attack()
{
if (_ready)
{
_activated = true;
}
return _ready;
}
// Update is called once per frame
void Update()
{
if (Input.GetButtonDown("Fire1") && Time.time > nextFire && !controller.Grounded)
{
nextFire = Time.time + Cooldown;
_ready = Time.time > nextFire;
StartCoroutine(fire());
}
if (!_activated) return;
print("Fire_Attack");
nextFire = Time.time + cooldown;
StartCoroutine(fire());
_activated = false;
//if (Input.GetButtonDown("Fire1") && Time.time > nextFire && !controller.Grounded)
//{
// nextFire = Time.time + Cooldown;
// StartCoroutine(fire());
//}
}
IEnumerator fire()
......
......@@ -38,6 +38,13 @@ namespace _Game.Scripts.Player
_waterAttack = this.gameObject.GetComponent<PlayerWaterAttack>();
_controller = this.gameObject.GetComponent<MovementController>();
state.UpdateElement(InfusedElement.None);
_airAttack.enabled = false;
_earthAttack.enabled = false;
_fireAttack.enabled = false;
_waterAttack.enabled = false;
_controller.SetMovementParameters(state.GetCurrentMovementState());
}
private void Update()
......@@ -46,19 +53,19 @@ namespace _Game.Scripts.Player
{
switch (state.GetCurrentElement())
{
case InfusedElement.Air:
//case InfusedElement.Air:
// if(_waterAttack.Attack())
// {
// state.ChangeCharges(-1);
// onChargeChange.Raise();
// }
break;
//break;
case InfusedElement.Earth:
// if(_waterAttack.Attack())
// {
// state.ChangeCharges(-1);
// onChargeChange.Raise();
// }
if (_earthAttack.Attack())
{
state.ChangeCharges(-1);
onChargeChange.Raise();
}
break;
case InfusedElement.Fire:
if (_fireAttack.Attack())
......
using System;
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
......@@ -19,13 +19,13 @@ namespace _Game.Scripts.Scriptable_Object
[SerializeField][Range(0, 5)] private int charges;
// [SerializeField] private float currentJumpForce;
// [SerializeField] private float currentSmoothing;
// [SerializeField] private bool currentAirControl;
// [SerializeField] private float currentMoveSpeed;
// [SerializeField] private int currentMaxJumpCount;
// [SerializeField] private float currentMass;
// [SerializeField] private float currentGravity;
// [SerializeField] private float currentJumpForce;
// [SerializeField] private float currentSmoothing;
// [SerializeField] private bool currentAirControl;
// [SerializeField] private float currentMoveSpeed;
// [SerializeField] private int currentMaxJumpCount;
// [SerializeField] private float currentMass;
// [SerializeField] private float currentGravity;
public void UpdateElement(InfusedElement newElement)
{
......@@ -46,7 +46,7 @@ namespace _Game.Scripts.Scriptable_Object
} else if ((charges + amount) <= 0)
{
charges = 0;
currentInfusedElement = InfusedElement.None;
UpdateElement(InfusedElement.None);
}
else
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment