Skip to content
Snippets Groups Projects
Commit 4789d1f5 authored by MaZiFAU's avatar MaZiFAU
Browse files

Auto Code Cleane-Up II

parent 632a6514
No related branches found
No related tags found
No related merge requests found
Showing
with 139 additions and 141 deletions
using System.Collections; using UnityEditor;
using UnityEngine; using UnityEngine;
using UnityEditor;
public class LaserPointer : Editor public class LaserPointer : Editor
{ {
......
 using UnityEditor;
using System.Collections;
using UnityEngine; using UnityEngine;
using UnityEditor;
/* ############################ /* ############################
* ## Show Size Editor Addon ## * ## Show Size Editor Addon ##
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
// http://www.digitalruby.com // http://www.digitalruby.com
// //
using UnityEngine;
using System.Collections.Generic; using System.Collections.Generic;
using UnityEngine;
namespace DigitalRuby.RainMaker namespace DigitalRuby.RainMaker
{ {
......
using System; using System;
using System.Linq;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq;
using UnityEngine; using UnityEngine;
[CreateAssetMenu(fileName = "DataContainerGadgetCollection", menuName = "ScriptableObjects/Spawn DataContainerGadgetCollection", order = 1)] [CreateAssetMenu(fileName = "DataContainerGadgetCollection", menuName = "ScriptableObjects/Spawn DataContainerGadgetCollection", order = 1)]
......
using System.Collections;
using System.Collections.Generic;
using UnityEngine; using UnityEngine;
[CreateAssetMenu(fileName = "DataContainerGadgetInit", menuName = "ScriptableObjects/SpawnDataContainerGadgetInit", order = 1)] [CreateAssetMenu(fileName = "DataContainerGadgetInit", menuName = "ScriptableObjects/SpawnDataContainerGadgetInit", order = 1)]
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
using System.Diagnostics; using System.Diagnostics;
using UnityEngine; using UnityEngine;
using UnityEngine.Networking; using UnityEngine.Networking;
using UnityEngine.SceneManagement;
using static CommunicationEvents; using static CommunicationEvents;
...@@ -142,7 +141,8 @@ IEnumerator ServerRoutine(String NetwAddress, int NA_id, double ics) ...@@ -142,7 +141,8 @@ IEnumerator ServerRoutine(String NetwAddress, int NA_id, double ics)
} }
public UnityWebRequest ping1(String NetwAddress) { public UnityWebRequest ping1(String NetwAddress)
{
//UnityWebRequest request = UnityWebRequest.Get("http://" + NetwAddress + "/scroll/list"); //UnityWebRequest request = UnityWebRequest.Get("http://" + NetwAddress + "/scroll/list");
UnityWebRequest request = UnityWebRequest.Get("http://" + NetwAddress + "/fact/list"); UnityWebRequest request = UnityWebRequest.Get("http://" + NetwAddress + "/fact/list");
return request; return request;
......
using System.Collections;
using System.Collections.Generic;
using UnityEngine; using UnityEngine;
using UnityEngine.EventSystems; using UnityEngine.EventSystems;
using static CommunicationEvents; using static CommunicationEvents;
......
using System.Linq; using REST_JSON_API;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using UnityEngine; using System.Linq;
using static CanonBallProblemCalculator2D;
using Unity.Mathematics; using Unity.Mathematics;
using System; using UnityEngine;
using REST_JSON_API;
using MoreLinq;
public class GenerateDemoFiles public class GenerateDemoFiles
{ {
......
using System.Collections; using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using TMPro; using TMPro;
using static TaskCharakterAnimation; using UnityEngine;
using static UIconfig; using static UIconfig;
public class CharacterDialog : MonoBehaviour public class CharacterDialog : MonoBehaviour
...@@ -89,8 +87,10 @@ private void Update() ...@@ -89,8 +87,10 @@ private void Update()
//print("InTalkingZone"); //print("InTalkingZone");
//print("CharacterDialog" + gameSucceeded + " && " + CharakterAnimation.getPlayerInTalkingZone()); //print("CharacterDialog" + gameSucceeded + " && " + CharakterAnimation.getPlayerInTalkingZone());
if (UIconfig.InputManagerVersion == 1) { if (UIconfig.InputManagerVersion == 1)
if (Input.GetKeyDown(KeyCode.C)) { {
if (Input.GetKeyDown(KeyCode.C))
{
//Type Next sentence if player is in the talkinZone around the TaskCharacter AND the player typed the return-Key //Type Next sentence if player is in the talkinZone around the TaskCharacter AND the player typed the return-Key
NextSentence(); NextSentence();
idleTime = 0; idleTime = 0;
...@@ -130,7 +130,8 @@ IEnumerator IdleTimer() ...@@ -130,7 +130,8 @@ IEnumerator IdleTimer()
} }
public void TypeFkt() { public void TypeFkt()
{
if (typingActive) if (typingActive)
{ {
if (this.timer >= this.typingSpeed) if (this.timer >= this.typingSpeed)
...@@ -156,7 +157,8 @@ public void TypeFkt() { ...@@ -156,7 +157,8 @@ public void TypeFkt() {
} }
public void NextSentence() { public void NextSentence()
{
//-2 because the last sentence is only for SucceededPushout-Purposes //-2 because the last sentence is only for SucceededPushout-Purposes
if (sentenceIndex < sentences.Length - 2) if (sentenceIndex < sentences.Length - 2)
{ {
...@@ -169,7 +171,8 @@ public void NextSentence() { ...@@ -169,7 +171,8 @@ public void NextSentence() {
TypeFkt(); TypeFkt();
textReseted = false; textReseted = false;
} }
else { else
{
letterIndex = 0; letterIndex = 0;
typingActive = false; typingActive = false;
timer = 0; timer = 0;
...@@ -184,7 +187,8 @@ public void NextSentence() { ...@@ -184,7 +187,8 @@ public void NextSentence() {
} }
} }
public void ResetSentence() { public void ResetSentence()
{
CharakterAnimation.setTaskCharacterAddressed(false); CharakterAnimation.setTaskCharacterAddressed(false);
sentenceIndex = 0; sentenceIndex = 0;
letterIndex = 0; letterIndex = 0;
......
using System.Collections; using UnityEngine;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using static UIconfig; using static UIconfig;
public class TaskCharakterAnimation : MonoBehaviour public class TaskCharakterAnimation : MonoBehaviour
...@@ -106,7 +103,8 @@ void Update() ...@@ -106,7 +103,8 @@ void Update()
return; return;
} }
else { else
{
//disable enter-key for talking //disable enter-key for talking
setPlayerInTalkingZone(false); setPlayerInTalkingZone(false);
} }
...@@ -120,7 +118,8 @@ void Update() ...@@ -120,7 +118,8 @@ void Update()
//Change to random direction after standing-state //Change to random direction after standing-state
currentTransform.RotateAround(currentTransform.position, Vector3.up, rotationUnits); currentTransform.RotateAround(currentTransform.position, Vector3.up, rotationUnits);
} }
else { else
{
//After rotating: Change to Walking-State //After rotating: Change to Walking-State
rotate = false; rotate = false;
this.timer = 0; this.timer = 0;
...@@ -209,7 +208,8 @@ public void stopHappy() ...@@ -209,7 +208,8 @@ public void stopHappy()
resetToStart(); resetToStart();
} }
public void resetToStart() { public void resetToStart()
{
//On Reset: Player must go into walking state, because it could be that after the happy/running-animation the player is //On Reset: Player must go into walking state, because it could be that after the happy/running-animation the player is
//out of radius and rotates -> AnimationController StateMachine always changes into walking-state after hyppAnimation //out of radius and rotates -> AnimationController StateMachine always changes into walking-state after hyppAnimation
walking = false; walking = false;
...@@ -222,12 +222,14 @@ public void resetToStart() { ...@@ -222,12 +222,14 @@ public void resetToStart() {
} }
//Static Method for CharacterDialog //Static Method for CharacterDialog
public bool getPlayerInTalkingZone() { public bool getPlayerInTalkingZone()
{
return playerInTalkingZone; return playerInTalkingZone;
} }
//Static Method for CharacterDialog //Static Method for CharacterDialog
public void setPlayerInTalkingZone(bool value) { public void setPlayerInTalkingZone(bool value)
{
playerInTalkingZone = value; playerInTalkingZone = value;
} }
......
using System; using UnityEngine;
using UnityEngine;
/// <summary> /// <summary>
/// Initiates named <see cref="Fact"/> and adds it to <see cref="StageStatic.stage.factState"/> /// Initiates named <see cref="Fact"/> and adds it to <see cref="StageStatic.stage.factState"/>
...@@ -144,7 +143,8 @@ public static AngleFact AddAngleFact(string pid1, string pid2, string pid3, bool ...@@ -144,7 +143,8 @@ public static AngleFact AddAngleFact(string pid1, string pid2, string pid3, bool
new AngleFact(pid1, pid2, pid3) new AngleFact(pid1, pid2, pid3)
, out _, samestep, gadget, scroll_label); , out _, samestep, gadget, scroll_label);
if (angle.is_right_angle) { if (angle.is_right_angle)
{
AddFactIfNotFound( AddFactIfNotFound(
new RightAngleFact(pid1, pid2, pid3) new RightAngleFact(pid1, pid2, pid3)
, out _, samestep, gadget, scroll_label); , out _, samestep, gadget, scroll_label);
......
using System.Collections.Generic; using Newtonsoft.Json;
using Newtonsoft.Json;
using UnityEngine;
using System.Linq;
using System; using System;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using UnityEngine.InputSystem.Utilities; using UnityEngine.InputSystem.Utilities;
using static CommunicationEvents; using static CommunicationEvents;
......
using System; using System;
using System.Linq;
using System.Collections.Generic;
using UnityEngine;
using System.Collections; using System.Collections;
using System.Collections.Generic;
using System.Linq;
using TMPro; using TMPro;
using UnityEditor; using UnityEditor;
using UnityEngine;
using static GlobalBehaviour; using static GlobalBehaviour;
/// <summary> /// <summary>
......
using System; using System;
using System.Linq;
using UnityEngine;
using System.Collections; using System.Collections;
using System.Linq;
using UnityEditor; using UnityEditor;
using UnityEngine;
/// <summary> /// <summary>
/// <see cref="Fact.Id"/>/ <c>MonoBehaviour</c> wrapper to be attached to <see cref="Fact.WorldRepresentation"/> /// <see cref="Fact.Id"/>/ <c>MonoBehaviour</c> wrapper to be attached to <see cref="Fact.WorldRepresentation"/>
......
...@@ -6,7 +6,8 @@ public class FactObjectUI : FactObject ...@@ -6,7 +6,8 @@ public class FactObjectUI : FactObject
public Image[] Images; public Image[] Images;
#region Unity Serialization #region Unity Serialization
protected override void _OnBeforeSerialize() { protected override void _OnBeforeSerialize()
{
if (Images == null) if (Images == null)
Images = GetComponents<Image>().ToArray(); Images = GetComponents<Image>().ToArray();
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment