Commit 4da68b05 authored by mthiele2's avatar mthiele2
Browse files

Motherfucker C´mon

parent 71fde8dd
fileFormatVersion: 2
guid: 1ee5b88cf6ba7e7498afe3152c1ea66b
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
......@@ -778,7 +778,7 @@ BoxCollider2D:
m_SpriteTilingProperty:
border: {x: 0, y: 0, z: 0, w: 0}
pivot: {x: 0.5, y: 0.5}
oldSize: {x: 2, y: 2}
oldSize: {x: 8, y: 8}
newSize: {x: 2, y: 2}
adaptiveTilingThreshold: 0.5
drawMode: 0
......@@ -10561,7 +10561,7 @@ GameObject:
type: 3}
m_PrefabInstance: {fileID: 1738372363}
m_PrefabAsset: {fileID: 0}
--- !u!114 &847607783
--- !u!114 &847607772
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
......@@ -23755,7 +23755,7 @@ BoxCollider2D:
m_SpriteTilingProperty:
border: {x: 0, y: 0, z: 0, w: 0}
pivot: {x: 0.5, y: 0.5}
oldSize: {x: 2, y: 2}
oldSize: {x: 8, y: 8}
newSize: {x: 2, y: 2}
adaptiveTilingThreshold: 0.5
drawMode: 0
......
......@@ -55,7 +55,7 @@ public class AI_WindAttack : WeightedAction
public void Fire(Vector3 attackdir)
{
GameObject projectile = Instantiate(windAttack, transform.position + attackdir*2, Quaternion.AngleAxis(Mathf.Atan2(-attackdir.y, -attackdir.x) * Mathf.Rad2Deg + 180, Vector3.forward));
GameObject projectile = Instantiate(windAttack, transform.position + attackdir*2, Quaternion.AngleAxis(0, Vector3.forward));
projectile.GetComponent<AI_WindProjectile>().setValues(damage, destroyTime, thrust);
body = projectile.GetComponent<Rigidbody2D>();
......
......@@ -14,6 +14,10 @@ public class AI_WindProjectile : MonoBehaviour
private void OnTriggerEnter2D(Collider2D other)
{
if (other.CompareTag("EnemyShot"))
{
return;
}
if (other.CompareTag("Player"))
{
Vector2 dir = other.GetComponentInParent<Transform>().position - transform.position;
......
......@@ -12,7 +12,7 @@ public class AI_FireProjectile : MonoBehaviour
private void OnTriggerEnter2D(Collider2D other)
{
if (other.CompareTag("Fire"))
if (other.CompareTag("Fire") || other.CompareTag("EnemyShot"))
{
return;
}
......
......@@ -34,9 +34,13 @@ public class Life : MonoBehaviour {
}
public void Death(){
//Reset
if (gameObject.CompareTag("Player"))
{
gameObject.SetActive(false);
Debug.Log("Death");
return;
}
Destroy(gameObject);
}
public int getCurrentLife()
......
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