]> git.lizzy.rs Git - SuperMouseAdventure.git/commitdiff
Schnecke verfolgt die Maus
authorKG0104 <76601263+KG0104@users.noreply.github.com>
Sun, 27 Jun 2021 13:16:50 +0000 (15:16 +0200)
committerKG0104 <76601263+KG0104@users.noreply.github.com>
Sun, 27 Jun 2021 13:16:50 +0000 (15:16 +0200)
2DGame/Assets/Animations/Enemies/Bosses/Snail/schnecke.controller
2DGame/Assets/Scenes/Green_Idyll/green_idyll_1.unity
2DGame/Assets/Scripts/Gegner/Boss/BossMovement.cs
2DGame/Assets/Scripts/Gegner/Boss/BossTrigger.cs
2DGame/Assets/Scripts/Gegner/EnemyScript.cs
2DGame/Assets/SuperMouseAdventureAgenda.odt

index 9b1500529f525508f9652681d81df87377b21068..7c1b0cd6338d11ee87946393fe8be8aa44331174 100644 (file)
@@ -237,8 +237,8 @@ AnimatorController:
     m_Type: 9
     m_DefaultFloat: 0
     m_DefaultInt: 0
-    m_DefaultBool: 1
-    m_Controller: {fileID: 9100000}
+    m_DefaultBool: 0
+    m_Controller: {fileID: 0}
   m_AnimatorLayers:
   - serializedVersion: 5
     m_Name: Base Layer
@@ -259,10 +259,7 @@ AnimatorStateTransition:
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
   m_Name: 
-  m_Conditions:
-  - m_ConditionMode: 1
-    m_ConditionEvent: Attack
-    m_EventTreshold: 0
+  m_Conditions: []
   m_DstStateMachine: {fileID: 0}
   m_DstState: {fileID: -747310801136120961}
   m_Solo: 0
index 2fa5933edb9a4efad193fc4984b215e664c389e7..2f7d986a798163471f2e1705a81c28d306b8b7ab 100644 (file)
@@ -6376,7 +6376,7 @@ Transform:
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 718850486}
   m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
-  m_LocalPosition: {x: 847.6, y: -13.8, z: 0}
+  m_LocalPosition: {x: 853.6, y: -11.3, z: 0}
   m_LocalScale: {x: 1, y: 1, z: 1}
   m_Children: []
   m_Father: {fileID: 0}
index 6086cd47f2e810ca28cc0d4ed5063643d0d3e131..7801157aceb0dadfba6148f121c3749874e61e35 100644 (file)
@@ -5,12 +5,11 @@ using UnityEngine;
 public class BossMovement : StateMachineBehaviour
 {
     public float speed = 4.5f;
-    public float attackRange = 1f;
+    public float attackRange = 3f;
     
     Transform player;
     Rigidbody2D rb;
     BossDirection boss;
-    BossTrigger bossTrigger;
 
     // OnStateEnter is called when a transition starts and the state machine starts to evaluate this state
     override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
@@ -18,7 +17,6 @@ public class BossMovement : StateMachineBehaviour
         player = GameObject.FindGameObjectWithTag("Player").transform;
         rb = animator.GetComponent<Rigidbody2D>();
         boss = animator.GetComponent<BossDirection>();
-        bossTrigger = animator.GetComponent<BossTrigger>();
     }
 
     // OnStateUpdate is called on each Update frame between OnStateEnter and OnStateExit callbacks
index a8af93278653064bf8a90a1628d1c47eca6e2185..4320095b8090d7bd0355c47eba4b90571aa14cdb 100644 (file)
@@ -15,10 +15,13 @@ public class BossTrigger : MonoBehaviour
 
     public void OnTriggerEnter2D(Collider2D collision)
     {
-        bossFight = true;
-        FindObjectOfType<AudioManager>().Stop("flowers");
-        FindObjectOfType<AudioManager>().Play("snail_fight");
+        if(collision.gameObject.CompareTag("Player"))
+        {
+            bossFight = true;
+            FindObjectOfType<AudioManager>().Stop("flowers");
+            FindObjectOfType<AudioManager>().Play("snail_fight");
 
-        boxCollider2D.enabled = false;
+            boxCollider2D.enabled = false;
+        }
     }
 }
index f0d2f1f33299605d789185c71cf41bed9a0bc344..9a37f5841749bcd2bf1ba14b398cb3ebf3c351aa 100644 (file)
@@ -7,12 +7,6 @@ public class EnemyScript : MonoBehaviour
     [SerializeField]
     int enemyHealth;
 
-    // Start is called before the first frame update
-    void Start()
-    {
-        
-    }
-
     // Update is called once per frame
     void Update()
     {
index 2304cc8a1a761b59742a107d3c11ae6ced590d90..2332d2f54724cf76c38e7d0b284388ff10c7537a 100644 (file)
Binary files a/2DGame/Assets/SuperMouseAdventureAgenda.odt and b/2DGame/Assets/SuperMouseAdventureAgenda.odt differ