Commit 82aa23e8 authored by mthiele2's avatar mthiele2
Browse files

Movement-Controller update drölf

parent bb958eb5
......@@ -1219,7 +1219,7 @@ Transform:
m_LocalScale: {x: 4.749867, y: 10.27617, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 29
m_RootOrder: 30
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &132361120
PrefabInstance:
......@@ -3914,7 +3914,7 @@ Transform:
- {fileID: 1694643540}
- {fileID: 2080599826}
m_Father: {fileID: 0}
m_RootOrder: 24
m_RootOrder: 25
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &268156081
PrefabInstance:
......@@ -4043,7 +4043,7 @@ Transform:
- {fileID: 1401599868}
- {fileID: 2060524169}
m_Father: {fileID: 0}
m_RootOrder: 20
m_RootOrder: 21
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &332050589
GameObject:
......@@ -6938,7 +6938,7 @@ PrefabInstance:
- target: {fileID: 52145075018362285, guid: 2e3528907311e438dab0d393127aa332,
type: 3}
propertyPath: m_RootOrder
value: 10
value: 11
objectReference: {fileID: 0}
- target: {fileID: 52145075018362285, guid: 2e3528907311e438dab0d393127aa332,
type: 3}
......@@ -7064,7 +7064,7 @@ Transform:
m_Children:
- {fileID: 602143163}
m_Father: {fileID: 0}
m_RootOrder: 25
m_RootOrder: 26
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!4 &554033098 stripped
Transform:
......@@ -8883,7 +8883,7 @@ Transform:
- {fileID: 1884291994}
- {fileID: 240417423}
m_Father: {fileID: 0}
m_RootOrder: 14
m_RootOrder: 15
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &659026448
PrefabInstance:
......@@ -8898,11 +8898,11 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 4738352637052488, guid: 6cd7f8e10f89642fd88661db0d3f3827, type: 3}
propertyPath: m_LocalPosition.x
value: -5.64
value: 17.67
objectReference: {fileID: 0}
- target: {fileID: 4738352637052488, guid: 6cd7f8e10f89642fd88661db0d3f3827, type: 3}
propertyPath: m_LocalPosition.y
value: 9.67
value: 5.74
objectReference: {fileID: 0}
- target: {fileID: 4738352637052488, guid: 6cd7f8e10f89642fd88661db0d3f3827, type: 3}
propertyPath: m_LocalPosition.z
......@@ -8926,7 +8926,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 4738352637052488, guid: 6cd7f8e10f89642fd88661db0d3f3827, type: 3}
propertyPath: m_RootOrder
value: 2
value: 3
objectReference: {fileID: 0}
- target: {fileID: 4738352637052488, guid: 6cd7f8e10f89642fd88661db0d3f3827, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
......@@ -8940,6 +8940,11 @@ PrefabInstance:
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 879798643589630551, guid: 6cd7f8e10f89642fd88661db0d3f3827,
type: 3}
propertyPath: Cooldown
value: 2
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 6cd7f8e10f89642fd88661db0d3f3827, type: 3}
--- !u!1 &670026445
......@@ -10355,7 +10360,7 @@ PrefabInstance:
- target: {fileID: 2888112478438871478, guid: 50a0ddec8ac259c46a58a6b5324a759d,
type: 3}
propertyPath: m_RootOrder
value: 9
value: 10
objectReference: {fileID: 0}
- target: {fileID: 2888112478438871478, guid: 50a0ddec8ac259c46a58a6b5324a759d,
type: 3}
......@@ -10454,7 +10459,7 @@ Transform:
- {fileID: 635980250}
- {fileID: 632331631}
m_Father: {fileID: 0}
m_RootOrder: 21
m_RootOrder: 22
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!4 &777237982 stripped
Transform:
......@@ -10517,7 +10522,7 @@ PrefabInstance:
- target: {fileID: 8474030530107407621, guid: d15c6360ddc5f6d45994b7a8ad351996,
type: 3}
propertyPath: m_RootOrder
value: 13
value: 14
objectReference: {fileID: 0}
- target: {fileID: 8474030530107407621, guid: d15c6360ddc5f6d45994b7a8ad351996,
type: 3}
......@@ -10621,6 +10626,49 @@ MonoBehaviour:
m_Calls: []
m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine.CoreModule, Version=0.0.0.0,
Culture=neutral, PublicKeyToken=null
--- !u!95 &847607773
Animator:
serializedVersion: 3
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 847607771}
m_Enabled: 1
m_Avatar: {fileID: 0}
m_Controller: {fileID: 9100000, guid: 375b65aa2cf684af6978a76db238f875, type: 2}
m_CullingMode: 0
m_UpdateMode: 0
m_ApplyRootMotion: 0
m_LinearVelocityBlending: 0
m_WarningMessage:
m_HasTransformHierarchy: 1
m_AllowConstantClipSamplingOptimization: 1
m_KeepAnimatorControllerStateOnDisable: 0
--- !u!114 &847607775 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 352228607, guid: 2e3528907311e438dab0d393127aa332,
type: 3}
m_PrefabInstance: {fileID: 1738372363}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 847607771}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 04143d4b812b542329f18723f680be69, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &847607780 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 52145075018362291, guid: 2e3528907311e438dab0d393127aa332,
type: 3}
m_PrefabInstance: {fileID: 1738372363}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 847607771}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e310ba2b65602490894409ff217e2731, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &852283141
GameObject:
m_ObjectHideFlags: 0
......@@ -10763,7 +10811,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 12
m_RootOrder: 13
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!68 &852283145
EdgeCollider2D:
......@@ -10860,7 +10908,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 4738352637052488, guid: f73431649cac0ba4b9385829c74919c0, type: 3}
propertyPath: m_RootOrder
value: 4
value: 5
objectReference: {fileID: 0}
- target: {fileID: 4738352637052488, guid: f73431649cac0ba4b9385829c74919c0, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
......@@ -11274,7 +11322,7 @@ Transform:
m_Children:
- {fileID: 399322774}
m_Father: {fileID: 0}
m_RootOrder: 18
m_RootOrder: 19
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &924553758
GameObject:
......@@ -11343,7 +11391,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 11
m_RootOrder: 12
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
--- !u!1 &933700279
GameObject:
......@@ -12662,6 +12710,95 @@ Transform:
m_Father: {fileID: 2027679588}
m_RootOrder: 6
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &1156671959
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 9144624198248816052, guid: 6275ea6a12d5b40b99ac332a7818ebf4,
type: 3}
propertyPath: m_Name
value: GameEventListeners
objectReference: {fileID: 0}
- target: {fileID: 9144624198248816055, guid: 6275ea6a12d5b40b99ac332a7818ebf4,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9144624198248816055, guid: 6275ea6a12d5b40b99ac332a7818ebf4,
type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9144624198248816055, guid: 6275ea6a12d5b40b99ac332a7818ebf4,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9144624198248816055, guid: 6275ea6a12d5b40b99ac332a7818ebf4,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9144624198248816055, guid: 6275ea6a12d5b40b99ac332a7818ebf4,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9144624198248816055, guid: 6275ea6a12d5b40b99ac332a7818ebf4,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9144624198248816055, guid: 6275ea6a12d5b40b99ac332a7818ebf4,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 9144624198248816055, guid: 6275ea6a12d5b40b99ac332a7818ebf4,
type: 3}
propertyPath: m_RootOrder
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9144624198248816055, guid: 6275ea6a12d5b40b99ac332a7818ebf4,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9144624198248816055, guid: 6275ea6a12d5b40b99ac332a7818ebf4,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9144624198248816055, guid: 6275ea6a12d5b40b99ac332a7818ebf4,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9144624198248816054, guid: 6275ea6a12d5b40b99ac332a7818ebf4,
type: 3}
propertyPath: allResponse.m_PersistentCalls.m_Calls.Array.data[0].m_Target
value:
objectReference: {fileID: 847607780}
- target: {fileID: 9144624198248816054, guid: 6275ea6a12d5b40b99ac332a7818ebf4,
type: 3}
propertyPath: allResponse.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName
value: UpdateMovementParameters
objectReference: {fileID: 0}
- target: {fileID: 9144624198248816053, guid: 6275ea6a12d5b40b99ac332a7818ebf4,
type: 3}
propertyPath: response.m_PersistentCalls.m_Calls.Array.data[0].m_Target
value:
objectReference: {fileID: 847607775}
- target: {fileID: 9144624198248816053, guid: 6275ea6a12d5b40b99ac332a7818ebf4,
type: 3}
propertyPath: response.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName
value: OnChargesChange
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 6275ea6a12d5b40b99ac332a7818ebf4, type: 3}
--- !u!4 &1175884672 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 8746327460217138312, guid: 615b74be12ac7ec4e9b491a7ef5cbbe1,
......@@ -13942,7 +14079,7 @@ Transform:
m_LocalScale: {x: 10, y: 10, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 27
m_RootOrder: 28
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &1351384590
PrefabInstance:
......@@ -15084,7 +15221,7 @@ PrefabInstance:
- target: {fileID: 2362585431789937784, guid: 35f9d08058ae666458aadeaeab77cf00,
type: 3}
propertyPath: m_RootOrder
value: 15
value: 16
objectReference: {fileID: 0}
- target: {fileID: 2362585431789937784, guid: 35f9d08058ae666458aadeaeab77cf00,
type: 3}
......@@ -15590,7 +15727,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 4738352637052488, guid: 436bce950d0b3f4499ca6ffc2704906a, type: 3}
propertyPath: m_RootOrder
value: 5
value: 6
objectReference: {fileID: 0}
- target: {fileID: 4738352637052488, guid: 436bce950d0b3f4499ca6ffc2704906a, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
......@@ -16616,7 +16753,7 @@ PrefabInstance:
- target: {fileID: 3962879857309384162, guid: 926b80f66a4f61b428fa10deff5f7842,
type: 3}
propertyPath: m_RootOrder
value: 8
value: 9
objectReference: {fileID: 0}
- target: {fileID: 3962879857309384162, guid: 926b80f66a4f61b428fa10deff5f7842,
type: 3}
......@@ -16897,7 +17034,7 @@ Transform:
- {fileID: 431282940}
- {fileID: 76739042}
m_Father: {fileID: 0}
m_RootOrder: 16
m_RootOrder: 17
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &1609048846
PrefabInstance:
......@@ -17218,7 +17355,7 @@ PrefabInstance:
- target: {fileID: 3962879857309384162, guid: 926b80f66a4f61b428fa10deff5f7842,
type: 3}
propertyPath: m_RootOrder
value: 17
value: 18
objectReference: {fileID: 0}
- target: {fileID: 3962879857309384162, guid: 926b80f66a4f61b428fa10deff5f7842,
type: 3}
......@@ -18387,12 +18524,12 @@ PrefabInstance:
- target: {fileID: 52145075018362285, guid: 2e3528907311e438dab0d393127aa332,
type: 3}
propertyPath: m_LocalPosition.x
value: 28.93
value: 24.5
objectReference: {fileID: 0}
- target: {fileID: 52145075018362285, guid: 2e3528907311e438dab0d393127aa332,
type: 3}
propertyPath: m_LocalPosition.y
value: 18.46
value: 5.7
objectReference: {fileID: 0}
- target: {fileID: 52145075018362285, guid: 2e3528907311e438dab0d393127aa332,
type: 3}
......@@ -18422,7 +18559,7 @@ PrefabInstance:
- target: {fileID: 52145075018362285, guid: 2e3528907311e438dab0d393127aa332,
type: 3}
propertyPath: m_RootOrder
value: 6
value: 7
objectReference: {fileID: 0}
- target: {fileID: 52145075018362285, guid: 2e3528907311e438dab0d393127aa332,
type: 3}
......@@ -18508,7 +18645,7 @@ PrefabInstance:
- target: {fileID: 2888112478438871478, guid: 50a0ddec8ac259c46a58a6b5324a759d,
type: 3}
propertyPath: m_RootOrder
value: 19
value: 20
objectReference: {fileID: 0}
- target: {fileID: 2888112478438871478, guid: 50a0ddec8ac259c46a58a6b5324a759d,
type: 3}
......@@ -19007,7 +19144,7 @@ Transform:
- {fileID: 1444759013}
- {fileID: 452352410}
m_Father: {fileID: 0}
m_RootOrder: 22
m_RootOrder: 23
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1836249939
GameObject:
......@@ -19505,7 +19642,7 @@ Transform:
m_LocalScale: {x: 10, y: 10, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 26
m_RootOrder: 27
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &1863909374
PrefabInstance:
......@@ -19552,7 +19689,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 4738352637052488, guid: 49ad5eee708571d449789cb994b54fcb, type: 3}
propertyPath: m_RootOrder
value: 3
value: 4
objectReference: {fileID: 0}
- target: {fileID: 4738352637052488, guid: 49ad5eee708571d449789cb994b54fcb, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
......@@ -20855,7 +20992,7 @@ PrefabInstance:
- target: {fileID: 3962879857309384162, guid: 5ab2931e604d74039ab392b8189d5cbc,
type: 3}
propertyPath: m_RootOrder
value: 7
value: 8
objectReference: {fileID: 0}
- target: {fileID: 3962879857309384162, guid: 5ab2931e604d74039ab392b8189d5cbc,
type: 3}
......@@ -22582,7 +22719,7 @@ PrefabInstance:
- target: {fileID: 5794390821522793468, guid: 4512b8eb550115443bbba2ecd59a960c,
type: 3}
propertyPath: m_RootOrder
value: 1
value: 2
objectReference: {fileID: 0}
- target: {fileID: 5794390821522793468, guid: 4512b8eb550115443bbba2ecd59a960c,
type: 3}
......@@ -23771,7 +23908,7 @@ Transform:
m_LocalScale: {x: 10, y: 10, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 28
m_RootOrder: 29
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &2139874648
GameObject:
......@@ -23885,7 +24022,7 @@ Transform:
m_Children:
- {fileID: 1475881766}
m_Father: {fileID: 0}
m_RootOrder: 23
m_RootOrder: 24
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &3565338863053385068
PrefabInstance:
......@@ -23937,7 +24074,7 @@ PrefabInstance:
- target: {fileID: 3565338863782319726, guid: d467d6f6bef5f8a44a20713cc2de4025,
type: 3}
propertyPath: m_RootOrder
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3565338863782319726, guid: d467d6f6bef5f8a44a20713cc2de4025,
type: 3}
......
......@@ -4,6 +4,7 @@ using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Events;
using _Game.Scripts.Scriptable_Object;
using _Game.Scripts.Player.PlayerAttacks.Earth;
[RequireComponent(typeof(Rigidbody2D), typeof(CapsuleCollider2D))]
public class MovementController : MonoBehaviour
......@@ -170,15 +171,22 @@ public class MovementController : MonoBehaviour
public void UpdateMovementParameters()
{
MovementState state = r_State.GetCurrentMovementState();
m_JumpForce = state.jumpForce;
m_MovementSmoothing = state.smoothing;
m_AirControl = state.airControl;
m_CanSwim = state.canSwim;
m_Speed = state.moveSpeed;
m_MaxJumpCount = state.maxJumpCount;
m_Rigidbody2D.mass = state.mass;
m_Rigidbody2D.gravityScale = state.gravity;
if (GetComponentInParent<PlayerEarthAttack>().isStomping)
{
Invoke("UpdateMovementParameters", 0.01f);
}
else
{
MovementState state = r_State.GetCurrentMovementState();
m_JumpForce = state.jumpForce;
m_MovementSmoothing = state.smoothing;
m_AirControl = state.airControl;
m_CanSwim = state.canSwim;
m_Speed = state.moveSpeed;
m_MaxJumpCount = state.maxJumpCount;
m_Rigidbody2D.mass = state.mass;
m_Rigidbody2D.gravityScale = state.gravity;
}
}
public void SetSwimming(bool value)
......
......@@ -10,9 +10,6 @@ namespace _Game.Scripts.Player.PlayerAttacks.Earth
public float massIncrease;
public bool isStomping;
MovementController controller;
private RaycastHit2D[] RaycastHits2D = new RaycastHit2D[8];
private LayerMask whatIsDestroyable;
private ContactFilter2D contactFilter2D;
private bool _ready;
private bool _activated;
......@@ -20,7 +17,6 @@ namespace _Game.Scripts.Player.PlayerAttacks.Earth
void Start()
{
controller = GetComponentInParent<MovementController>();
contactFilter2D.SetLayerMask(whatIsDestroyable);
_nextFire = 0;
_ready = true;
......
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