found a name

This commit is contained in:
klemek
2020-12-22 15:48:34 +01:00
parent 51b660318e
commit d208236adc
24 changed files with 39 additions and 38 deletions
+1 -1
View File
@@ -2,7 +2,7 @@
using System.Collections.Generic;
using UnityEngine;
namespace UntitledLogicGame
namespace CompuLogic
{
public class CameraManager : MonoBehaviour
{
+1 -1
View File
@@ -3,7 +3,7 @@ using System.Collections.Generic;
using System.Linq;
using UnityEngine;
namespace UntitledLogicGame
namespace CompuLogic
{
//public class TODO : MonoBehaviour
//{
+2 -2
View File
@@ -2,9 +2,9 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UntitledLogicGame.Workspace;
using CompuLogic.Workspace;
namespace UntitledLogicGame
namespace CompuLogic
{
public class GameManager : MonoBehaviour
{
+2 -2
View File
@@ -2,9 +2,9 @@
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using UntitledLogicGame.Workspace;
using CompuLogic.Workspace;
namespace UntitledLogicGame
namespace CompuLogic
{
public class PointerManager : MonoBehaviour
{
+1 -1
View File
@@ -4,7 +4,7 @@ using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.UI;
namespace UntitledLogicGame.UI
namespace CompuLogic.UI
{
public class UIDelete : UIToolbarButton, IPointerEnterHandler, IPointerExitHandler
{
+1 -1
View File
@@ -6,7 +6,7 @@ using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.UI;
namespace UntitledLogicGame.UI
namespace CompuLogic.UI
{
public class UIFolder : UIToolbarButton
{
+5 -4
View File
@@ -6,9 +6,9 @@ using TMPro;
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.UI;
using UntitledLogicGame.Workspace;
using CompuLogic.Workspace;
namespace UntitledLogicGame.UI
namespace CompuLogic.UI
{
public class UIGate : UIToolbarButton
{
@@ -18,11 +18,12 @@ namespace UntitledLogicGame.UI
get
{
if(_maxSize == null)
_maxSize = GameManager.Instance.GateSprites.Select(s => s.rect.width).Max();
_maxSize = GameManager.Instance.GateSprites.Select(s => Math.Max(s.rect.width, s.rect.height)).Max();
return _maxSize.Value;
}
}
private float? _maxSize;
#endregion
#region Unity Properties
@@ -37,7 +38,7 @@ namespace UntitledLogicGame.UI
{
var sprite = value.GetComponentInChildren<SpriteRenderer>().sprite;
Image.sprite = sprite;
Image.GetComponent<RectTransform>().sizeDelta = new Vector2(100f, 100 * sprite.rect.width / MaxSize);
Image.GetComponent<RectTransform>().sizeDelta = new Vector2(100f, 100 * Math.Max(sprite.rect.width, sprite.rect.height) / MaxSize);
gameObject.name = "UI_" + value.GateType.ToString();
Text.text = value.UIName;
}
+2 -2
View File
@@ -3,9 +3,9 @@ using System.Collections;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using UntitledLogicGame.Workspace.Gates;
using CompuLogic.Workspace.Gates;
namespace UntitledLogicGame.UI
namespace CompuLogic.UI
{
public class UIManager : MonoBehaviour
{
+1 -1
View File
@@ -6,7 +6,7 @@ using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.UI;
namespace UntitledLogicGame.UI
namespace CompuLogic.UI
{
public class UIToolbarButton : MonoBehaviour, IPointerDownHandler
{
+1 -1
View File
@@ -4,7 +4,7 @@ using System.Linq;
using UnityEngine;
using Random = UnityEngine.Random;
namespace UntitledLogicGame
namespace CompuLogic
{
public static class Utils
{
+1 -1
View File
@@ -3,7 +3,7 @@ using System.Collections.Generic;
using System.Linq;
using UnityEngine;
namespace UntitledLogicGame.Workspace
namespace CompuLogic.Workspace
{
public class Anchor : MonoBehaviour
{
+1 -1
View File
@@ -3,7 +3,7 @@ using System.Collections.Generic;
using System.Linq;
using UnityEngine;
namespace UntitledLogicGame.Workspace
namespace CompuLogic.Workspace
{
public class Cable : MonoBehaviour
{
+2 -2
View File
@@ -2,9 +2,9 @@
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using UntitledLogicGame.Workspace.Gates;
using CompuLogic.Workspace.Gates;
namespace UntitledLogicGame.Workspace
namespace CompuLogic.Workspace
{
public class Gate : MonoBehaviour
{
@@ -4,12 +4,12 @@ using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using UnityEngine;
using UntitledLogicGame.Workspace;
using UntitledLogicGame.Workspace.Gates;
using CompuLogic.Workspace;
using CompuLogic.Workspace.Gates;
using YamlDotNet.Serialization;
using YamlDotNet.Serialization.NamingConventions;
namespace UntitledLogicGame.Workspace
namespace CompuLogic.Workspace
{
public class GatePrefabFactory : MonoBehaviour
{
+2 -2
View File
@@ -2,9 +2,9 @@
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using UntitledLogicGame.Workspace.Gates;
using CompuLogic.Workspace.Gates;
namespace UntitledLogicGame.Workspace
namespace CompuLogic.Workspace
{
public class GateSprite : MonoBehaviour
{
@@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Linq;
namespace UntitledLogicGame.Workspace.Gates
namespace CompuLogic.Workspace.Gates
{
public abstract class GateDefinition
{
@@ -1,7 +1,7 @@
using System;
using System.Collections.Generic;
namespace UntitledLogicGame.Workspace.Gates
namespace CompuLogic.Workspace.Gates
{
#region 000 - Technical
+1 -1
View File
@@ -1,4 +1,4 @@
namespace UntitledLogicGame.Workspace.Gates
namespace CompuLogic.Workspace.Gates
{
public enum GateType
{
+1 -1
View File
@@ -1,7 +1,7 @@
using System.Collections.Generic;
using System.Linq;
namespace UntitledLogicGame.Workspace.Gates
namespace CompuLogic.Workspace.Gates
{
public class InputState : State
{
+1 -1
View File
@@ -3,7 +3,7 @@ using System.Collections.Generic;
using System.Linq;
using UnityEngine;
namespace UntitledLogicGame.Workspace
namespace CompuLogic.Workspace
{
public class InputGate : Gate
{
+1 -1
View File
@@ -3,7 +3,7 @@ using System.Collections.Generic;
using System.Linq;
using UnityEngine;
namespace UntitledLogicGame.Workspace
namespace CompuLogic.Workspace
{
public class OutputGate : Gate
{