Commit c76d0176 authored by Sebastian Frey's avatar Sebastian Frey

fixed enemy mass

parent 7db0047a
......@@ -12,17 +12,17 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 353b156b7c59b1c45a8767d7500b31fb, type: 3}
m_Name: PlayerState
m_EditorClassIdentifier:
currentInfusedElement: 0
currentInfusedElement: 2
currentMoveState:
jumpForce: 15
jumpForce: 10
smoothing: 0.03
airControl: 1
canSwim: 1
moveSpeed: 30
moveSpeed: 20
maxJumpCount: 1
mass: 1
gravity: 3
movementStates: {fileID: 11400000, guid: c757aad6925b37a46b916f609fa9012b, type: 2}
onElementInfused: {fileID: 11400000, guid: 7e5b80a8353af1846a878c3a997bdb4a, type: 2}
onChargeChange: {fileID: 11400000, guid: 6ec6544f645a9d1458383b111fcaf8b6, type: 2}
charges: 0
charges: 1
......@@ -143,3 +143,4 @@ MonoBehaviour:
m_EditorClassIdentifier:
destroyTime: 3
pushFactor: 5
pushEnemyFactor: 1000
......@@ -48,7 +48,7 @@ Rigidbody2D:
m_Simulated: 1
m_UseFullKinematicContacts: 0
m_UseAutoMass: 0
m_Mass: 10000
m_Mass: 1
m_LinearDrag: 5
m_AngularDrag: 0.05
m_GravityScale: 5
......
......@@ -15,6 +15,7 @@ GameObject:
- component: {fileID: 5627041003248903908}
- component: {fileID: 8217090596470256212}
- component: {fileID: 820980056}
- component: {fileID: 4551173074651665413}
m_Layer: 14
m_Name: Feuer-Gegner
m_TagString: Fire
......@@ -49,7 +50,7 @@ Rigidbody2D:
m_Simulated: 1
m_UseFullKinematicContacts: 0
m_UseAutoMass: 0
m_Mass: 10000
m_Mass: 1
m_LinearDrag: 5
m_AngularDrag: 0.05
m_GravityScale: 3
......@@ -177,6 +178,24 @@ Animator:
m_HasTransformHierarchy: 1
m_AllowConstantClipSamplingOptimization: 1
m_KeepAnimatorControllerStateOnDisable: 0
--- !u!114 &4551173074651665413
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1634356314439590}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3c0ce2eb523274b6fa61fccbf0227d85, type: 3}
m_Name:
m_EditorClassIdentifier:
m_MaxLife: 1
LostLife:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine.CoreModule, Version=0.0.0.0,
Culture=neutral, PublicKeyToken=null
--- !u!1 &8738143122139646636
GameObject:
m_ObjectHideFlags: 0
......
......@@ -50,7 +50,7 @@ Rigidbody2D:
m_Simulated: 1
m_UseFullKinematicContacts: 0
m_UseAutoMass: 0
m_Mass: 10
m_Mass: 1
m_LinearDrag: 5
m_AngularDrag: 0.05
m_GravityScale: 5
......
......@@ -51,7 +51,7 @@ Rigidbody2D:
m_Simulated: 1
m_UseFullKinematicContacts: 0
m_UseAutoMass: 0
m_Mass: 3
m_Mass: 1
m_LinearDrag: 5
m_AngularDrag: 0.05
m_GravityScale: 0
......
......@@ -90,7 +90,7 @@ public class AI_DashAttack : WeightedAction
IEnumerator windUp(Vector3 attackdir)
{
float updateTarget = windUpTime;
float currentTime = 0.0f;
//float currentTime = 0.0f;
//do
//{
......
......@@ -59,24 +59,15 @@ namespace _Game.Scripts.Player.PlayerAttacks.Water
if (other.gameObject.CompareTag("Fire"))
{
other.gameObject.GetComponent<Life>().Damage(1);
if (Mathf.Abs(_rigidbody2D.velocity.x) > 0.0f)
{
var velocity = _rigidbody2D.velocity;
var projectileVelocityX = velocity.x / Mathf.Abs(velocity.x);
other.gameObject.GetComponent<Rigidbody2D>().AddForce(new Vector2(projectileVelocityX * pushEnemyFactor, 0.0f));
}
Destroy();
}
else
if (Mathf.Abs(_rigidbody2D.velocity.x) > 0.0f)
{
if (Mathf.Abs(_rigidbody2D.velocity.x) > 0.0f)
{
var velocity = _rigidbody2D.velocity;
var projectileVelocityX = velocity.x / Mathf.Abs(velocity.x);
other.gameObject.GetComponent<Rigidbody2D>().AddForce(new Vector2(projectileVelocityX * pushEnemyFactor, 0.0f));
}
Destroy();
var velocity = _rigidbody2D.velocity;
var projectileVelocityX = velocity.x / Mathf.Abs(velocity.x);
other.gameObject.GetComponent<Rigidbody2D>().AddForce(new Vector2(projectileVelocityX * pushEnemyFactor, 0.0f));
}
Destroy();
}
else if (other.gameObject.CompareTag("DestroyableByFire"))
{
......
......@@ -30,7 +30,7 @@ TagManager:
- ElementalAttacks
- BackgroundTileMap
- Enemy
-
- MovableObject
-
-
-
......
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