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 UnityEditor;
public class LaserPointer : Editor
{
......

using System.Collections;
using UnityEditor;
using UnityEngine;
using UnityEditor;
/* ############################
* ## Show Size Editor Addon ##
......
......@@ -3,8 +3,8 @@
// http://www.digitalruby.com
//
using UnityEngine;
using System.Collections.Generic;
using UnityEngine;
namespace DigitalRuby.RainMaker
{
......
using System;
using System.Linq;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
[CreateAssetMenu(fileName = "DataContainerGadgetCollection", menuName = "ScriptableObjects/Spawn DataContainerGadgetCollection", order = 1)]
......
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[CreateAssetMenu(fileName = "DataContainerGadgetInit", menuName = "ScriptableObjects/SpawnDataContainerGadgetInit", order = 1)]
......
......@@ -3,7 +3,6 @@
using System.Diagnostics;
using UnityEngine;
using UnityEngine.Networking;
using UnityEngine.SceneManagement;
using static CommunicationEvents;
......@@ -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 + "/fact/list");
return request;
......
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.EventSystems;
using static CommunicationEvents;
......
using System.Linq;
using REST_JSON_API;
using System;
using System.Collections.Generic;
using UnityEngine;
using static CanonBallProblemCalculator2D;
using System.Linq;
using Unity.Mathematics;
using System;
using REST_JSON_API;
using MoreLinq;
using UnityEngine;
public class GenerateDemoFiles
{
......
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using TMPro;
using static TaskCharakterAnimation;
using UnityEngine;
using static UIconfig;
public class CharacterDialog : MonoBehaviour
......@@ -89,8 +87,10 @@ private void Update()
//print("InTalkingZone");
//print("CharacterDialog" + gameSucceeded + " && " + CharakterAnimation.getPlayerInTalkingZone());
if (UIconfig.InputManagerVersion == 1) {
if (Input.GetKeyDown(KeyCode.C)) {
if (UIconfig.InputManagerVersion == 1)
{
if (Input.GetKeyDown(KeyCode.C))
{
//Type Next sentence if player is in the talkinZone around the TaskCharacter AND the player typed the return-Key
NextSentence();
idleTime = 0;
......@@ -130,7 +130,8 @@ IEnumerator IdleTimer()
}
public void TypeFkt() {
public void TypeFkt()
{
if (typingActive)
{
if (this.timer >= this.typingSpeed)
......@@ -156,7 +157,8 @@ public void TypeFkt() {
}
public void NextSentence() {
public void NextSentence()
{
//-2 because the last sentence is only for SucceededPushout-Purposes
if (sentenceIndex < sentences.Length - 2)
{
......@@ -169,7 +171,8 @@ public void NextSentence() {
TypeFkt();
textReseted = false;
}
else {
else
{
letterIndex = 0;
typingActive = false;
timer = 0;
......@@ -184,7 +187,8 @@ public void NextSentence() {
}
}
public void ResetSentence() {
public void ResetSentence()
{
CharakterAnimation.setTaskCharacterAddressed(false);
sentenceIndex = 0;
letterIndex = 0;
......
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using UnityEngine;
using static UIconfig;
public class TaskCharakterAnimation : MonoBehaviour
......@@ -106,7 +103,8 @@ void Update()
return;
}
else {
else
{
//disable enter-key for talking
setPlayerInTalkingZone(false);
}
......@@ -120,7 +118,8 @@ void Update()
//Change to random direction after standing-state
currentTransform.RotateAround(currentTransform.position, Vector3.up, rotationUnits);
}
else {
else
{
//After rotating: Change to Walking-State
rotate = false;
this.timer = 0;
......@@ -209,7 +208,8 @@ public void stopHappy()
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
//out of radius and rotates -> AnimationController StateMachine always changes into walking-state after hyppAnimation
walking = false;
......@@ -222,12 +222,14 @@ public void resetToStart() {
}
//Static Method for CharacterDialog
public bool getPlayerInTalkingZone() {
public bool getPlayerInTalkingZone()
{
return playerInTalkingZone;
}
//Static Method for CharacterDialog
public void setPlayerInTalkingZone(bool value) {
public void setPlayerInTalkingZone(bool value)
{
playerInTalkingZone = value;
}
......
using System;
using UnityEngine;
using UnityEngine;
/// <summary>
/// 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
new AngleFact(pid1, pid2, pid3)
, out _, samestep, gadget, scroll_label);
if (angle.is_right_angle) {
if (angle.is_right_angle)
{
AddFactIfNotFound(
new RightAngleFact(pid1, pid2, pid3)
, out _, samestep, gadget, scroll_label);
......
using System.Collections.Generic;
using Newtonsoft.Json;
using UnityEngine;
using System.Linq;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using UnityEngine.InputSystem.Utilities;
using static CommunicationEvents;
......
using System;
using System.Linq;
using System.Collections.Generic;
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using TMPro;
using UnityEditor;
using UnityEngine;
using static GlobalBehaviour;
/// <summary>
......
using System;
using System.Linq;
using UnityEngine;
using System.Collections;
using System.Linq;
using UnityEditor;
using UnityEngine;
/// <summary>
/// <see cref="Fact.Id"/>/ <c>MonoBehaviour</c> wrapper to be attached to <see cref="Fact.WorldRepresentation"/>
......
......@@ -6,7 +6,8 @@ public class FactObjectUI : FactObject
public Image[] Images;
#region Unity Serialization
protected override void _OnBeforeSerialize() {
protected override void _OnBeforeSerialize()
{
if (Images == null)
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