From ef9a8b4acedbd4a275440accb7f9276cacbb5b5f Mon Sep 17 00:00:00 2001
From: Wienholt <wienholt@uni-bremen.de>
Date: Thu, 21 Nov 2019 15:09:52 +0100
Subject: [PATCH] tried to coomment in Lisas scripts. I will later upload a
 .txt file about every component etc that is needed for the animations

---
 Greta/Assets/BoeseOmaAnimation.cs             |  3 +-
 Greta/Assets/JonathanZuckt.cs                 |  3 ++
 Greta/Assets/JosieAnimation.cs                |  2 ++
 Greta/Assets/KatzenbesitzerinAnimation.cs     |  2 ++
 Greta/Assets/OnClick.cs                       |  3 +-
 Greta/Assets/OpaAnimation.cs                  | 22 ++++----------
 Greta/Assets/PAC Engine/Scripts/SteveZuckt.cs | 29 +++----------------
 Greta/Assets/SchaffnerAnimation.cs            |  2 ++
 README.md                                     |  5 ++--
 9 files changed, 25 insertions(+), 46 deletions(-)

diff --git a/Greta/Assets/BoeseOmaAnimation.cs b/Greta/Assets/BoeseOmaAnimation.cs
index cc79c6ca..4598689d 100644
--- a/Greta/Assets/BoeseOmaAnimation.cs
+++ b/Greta/Assets/BoeseOmaAnimation.cs
@@ -16,7 +16,8 @@ public class BoeseOmaAnimation : MonoBehaviour
     // Update is called once per frame
     void Update()
     {
-
+        /* see stevezuckt.cs for more informations
+         */
         if (this.GetComponent<Entity>().dialogueInitiated)
         {
             currentAnimationState = "DameSprechend";
diff --git a/Greta/Assets/JonathanZuckt.cs b/Greta/Assets/JonathanZuckt.cs
index 6feeed3b..b79da17e 100644
--- a/Greta/Assets/JonathanZuckt.cs
+++ b/Greta/Assets/JonathanZuckt.cs
@@ -17,6 +17,9 @@ public class JonathanZuckt : MonoBehaviour
     // Update is called once per frame
     void Update()
     {
+
+        /* see stevezuckt.cs for more informations
+         */
         if (this.GetComponent<Entity>().dialogueInitiated)
         {
             currentAnimationState = "IdleGiraffe";
diff --git a/Greta/Assets/JosieAnimation.cs b/Greta/Assets/JosieAnimation.cs
index 436c71b9..7ef62146 100644
--- a/Greta/Assets/JosieAnimation.cs
+++ b/Greta/Assets/JosieAnimation.cs
@@ -18,6 +18,8 @@ public class JosieAnimation : MonoBehaviour
     void Update()
     {
 
+        /* see stevezuckt.cs for more informations
+         */
         if (this.GetComponent<Entity>().dialogueInitiated)
         {
             currentAnimationState = "BoxerinSprechend";
diff --git a/Greta/Assets/KatzenbesitzerinAnimation.cs b/Greta/Assets/KatzenbesitzerinAnimation.cs
index c63366f7..fdf0002d 100644
--- a/Greta/Assets/KatzenbesitzerinAnimation.cs
+++ b/Greta/Assets/KatzenbesitzerinAnimation.cs
@@ -17,6 +17,8 @@ public class KatzenbesitzerinAnimation : MonoBehaviour
     void Update()
     {
 
+        /* see stevezuckt.cs for more informations
+         */
         if (this.GetComponent<Entity>().dialogueInitiated)
         {
             currentAnimationState = "speakCat";
diff --git a/Greta/Assets/OnClick.cs b/Greta/Assets/OnClick.cs
index 0670c5ac..593c33a4 100644
--- a/Greta/Assets/OnClick.cs
+++ b/Greta/Assets/OnClick.cs
@@ -4,6 +4,8 @@ using UnityEngine;
 
 public class OnClick : MonoBehaviour
 {
+    /*this script is used for the Schwarzblende
+     */
     public GameObject Sprite;
     // Start is called before the first frame update
     void Start()
@@ -14,7 +16,6 @@ public class OnClick : MonoBehaviour
     // Update is called once per frame
     void Update()
     {
-        Debug.Log("Danach bring ich mich um");
         var blende = GameObject.Find("Schwarzblende (1)");
         var Player = GameObject.Find("Player");
         var GameManager = GameObject.Find("GameManager");
diff --git a/Greta/Assets/OpaAnimation.cs b/Greta/Assets/OpaAnimation.cs
index fb2dfa90..232ddefe 100644
--- a/Greta/Assets/OpaAnimation.cs
+++ b/Greta/Assets/OpaAnimation.cs
@@ -12,9 +12,7 @@ public class OpaAnimation : MonoBehaviour
 
 
     private float stockAnimationTime = -1f;
-    // 0 = not triggered 
-    // 1 = currently active
-    // 2 = forbids triggering
+
     private int animationStateStock = 0;
 
     // Start is called before the first frame update
@@ -26,9 +24,9 @@ public class OpaAnimation : MonoBehaviour
     // Update is called once per frame
     void Update()
     {
-        if (this.GetComponent<Entity>().dialogueInitiated)//&& this.GetComponent<Entity>().GetNodeIndex() != 3)   //Database.core.entities[SupportFunctions.core.findEntityIndexById(entityID)].entityStageId != 5)
+        if (this.GetComponent<Entity>().dialogueInitiated)
         {
-            if (this.GetComponent<Entity>().nodeIndex == 2)  //Database.core.entities[SupportFunctions.core.findEntityIndexById(entityID)].entityStageId == 6)
+            if (this.GetComponent<Entity>().nodeIndex == 2)  
             {
                 
                 if (animationStateStock == 0)
@@ -42,15 +40,13 @@ public class OpaAnimation : MonoBehaviour
             {
                 currentAnimationState = "Sprechend";
                 skeletonAnimation.AnimationName = "Sprechend";
-                Debug.Log("Das könnte funktionieren!"); //Clicked " + hit.transform.gameObject.name);
             }
         }
 
-        else //(this.GetComponent<Entity>().dialogueInitiated && Database.core.entities[SupportFunctions.core.findEntityIndexById(entityID)].entityStageId == 0)
+        else 
         {
             currentAnimationState = "Schlafend";
             skeletonAnimation.AnimationName = "Schlafend";
-            Debug.Log("Opa schläft."); // Clicked " + hit.transform.gameObject.name);
         }
 
         if (animationStateStock == 1)
@@ -58,22 +54,16 @@ public class OpaAnimation : MonoBehaviour
             reduceStockAnimation();
         }
 
-       
-
-        // HIER FEHLT NOCH DER STOCKSCHLAG
-        // erster CLick SChlafen
-        // zweiter Click SPrechen
-        // dritter Click Wurfanimation
-        //default Schlafen
     }
 
+    /*the last two methods change the time for how long each animation is played when triggered
+     */
     private void startStockAnimation(float time)
     {
         stockAnimationTime = time;
         animationStateStock = 1;
         currentAnimationState = "StockSchlag";
         skeletonAnimation.AnimationName = "StockSchlag";
-        Debug.Log("Opa schlägt mit dem Stock");
     }
 
     private void reduceStockAnimation()
diff --git a/Greta/Assets/PAC Engine/Scripts/SteveZuckt.cs b/Greta/Assets/PAC Engine/Scripts/SteveZuckt.cs
index d0ce14d1..db374c60 100644
--- a/Greta/Assets/PAC Engine/Scripts/SteveZuckt.cs	
+++ b/Greta/Assets/PAC Engine/Scripts/SteveZuckt.cs	
@@ -18,42 +18,21 @@ public class SteveZuckt : MonoBehaviour
     void Update()
     {
         
-      //  if (Input.GetMouseButtonDown(0))
-        //{
-            Debug.Log("Steve zuckt Mouse Down");
-            //Vector3 mousePos = Input.mousePosition;
-            //mousePos.z = 10;
-
-            //Vector3 screenPos = Camera.main.ScreenToWorldPoint(mousePos);
-
-            //RaycastHit2D hit = Physics2D.Raycast(screenPos, Vector2.zero);
-            //Vector2 point = Camera.main.ScreenToWorldPoint(Input.mousePosition);
-            //RaycastHit2D hit = Physics2D.Raycast(point, Vector2.zero, Mathf.Infinity, ~(1 << LayerMask.NameToLayer("MovementCatcher")));
-
-            //Debug.Log(hit.transform.gameObject.name);
 
-            //if (hit && hit.transform.gameObject.name.Equals("Krokodilbesitzer"))
+            Debug.Log("Steve zuckt Mouse Down");
+            /* If-statement to check if our player talks to Steve. If yes --> The animation is
+            played. If not --> he will not be animated.
+             */
             if(this.GetComponent<Entity>().dialogueInitiated)
             {
                 currentAnimationState = "SteveAnprechen";
                 skeletonAnimation.AnimationName = "SteveAnprechen";  
-                Debug.Log("Das könnte funktionieren! "); //Clicked " + hit.transform.gameObject.name);
             }
             else
             {
                 currentAnimationState = "<None>";
                 skeletonAnimation.AnimationName = "<None>";
-                Debug.Log("Das funktioniert so nicht! "); // Clicked " + hit.transform.gameObject.name);
             }
-      //  }
     }
 
-    //void OnMouseDown()
-    //{
-    //    skeletonAnimation.AnimationName = "SteveAnsprechen";
-    //    //currentAnimationState = "animation";
-    //    Debug.Log("HAllo, ich bin getriggered");
-
-    //}
-
 }
diff --git a/Greta/Assets/SchaffnerAnimation.cs b/Greta/Assets/SchaffnerAnimation.cs
index 6e1cc667..c08d8e2a 100644
--- a/Greta/Assets/SchaffnerAnimation.cs
+++ b/Greta/Assets/SchaffnerAnimation.cs
@@ -18,6 +18,8 @@ public class SchaffnerAnimation : MonoBehaviour
     void Update()
     {
 
+        /* see stevezuckt.cs for more informations
+         */
         if (this.GetComponent<Entity>().dialogueInitiated)
         {
             currentAnimationState = "Zeigend";
diff --git a/README.md b/README.md
index 45f01bef..7e170fe7 100644
--- a/README.md
+++ b/README.md
@@ -96,13 +96,13 @@ It is important to understand how the Plugin works to create good code. Especial
 
 If you want to use the progress of the game an important factor with the game play you will need to use the database. After you understand how it works it is quite handy to use it for simple tasks, e.g. changing the scenery (Our ChangeScenery.cs for example) or also to make workarounds possible.
 
-Now I want to show what I mean. 
+Now I want to show what I mean.
 
         if (Database.core.entities[SupportFunctions.core.findEntityIndexById(entityID)].entityStageId == stage)
         {
             oldSprite.GetComponent<SpriteRenderer>().enabled = false;
             neueSprite.GetComponent<SpriteRenderer>().enabled = true;
-            
+
 
             if (DestroyOnChange == true)
             {
@@ -122,4 +122,3 @@ And last, this plugin was only updated once. Lisa and I saw some of its shortcom
 
 To find more information about Unity and how the basics work, click here:
 [https://docs.unity3d.com/2018.3/Documentation/Manual/UnityManual.html](https://docs.unity3d.com/2018.3/Documentation/Manual/UnityManual.html)
-
-- 
GitLab