mirror of
https://github.com/Leahnaya/TheKingsRace.git
synced 2026-04-26 02:00:54 -05:00
Started fixing KingUI
This commit is contained in:
parent
212a17ad7e
commit
04d92b39ee
|
|
@ -51,7 +51,7 @@ Canvas:
|
|||
serializedVersion: 3
|
||||
m_RenderMode: 1
|
||||
m_Camera: {fileID: 8183403964090928733}
|
||||
m_PlaneDistance: 100
|
||||
m_PlaneDistance: 2.33
|
||||
m_PixelPerfect: 0
|
||||
m_ReceivesEvents: 1
|
||||
m_OverrideSorting: 0
|
||||
|
|
@ -115,7 +115,8 @@ MonoBehaviour:
|
|||
m_EditorClassIdentifier:
|
||||
Thunderstorm: {fileID: 0}
|
||||
Block: {fileID: 8397943440757562192, guid: 8a60e3ee825870040bcb23f43e470e25, type: 3}
|
||||
Hail: {fileID: 0}
|
||||
HailSprite: {fileID: 0}
|
||||
HailObject: {fileID: 0}
|
||||
Slime: {fileID: 0}
|
||||
Grid: {fileID: 0}
|
||||
KingCam: {fileID: 8183403964090928733}
|
||||
|
|
@ -148,7 +149,7 @@ RectTransform:
|
|||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8183403963399572359}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 500}
|
||||
m_LocalScale: {x: 0.9, y: 0.8, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 8183403964692436328}
|
||||
|
|
@ -160,8 +161,8 @@ RectTransform:
|
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0.00024414062, y: 213.4}
|
||||
m_SizeDelta: {x: -300.0005, y: -400.8}
|
||||
m_AnchoredPosition: {x: 0, y: 220}
|
||||
m_SizeDelta: {x: 0, y: -440}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &8183403963399572356
|
||||
CanvasRenderer:
|
||||
|
|
@ -178,7 +179,7 @@ MonoBehaviour:
|
|||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8183403963399572359}
|
||||
m_Enabled: 1
|
||||
m_Enabled: 0
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
|
|
@ -307,7 +308,7 @@ RectTransform:
|
|||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8183403963861912040}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0.00003184316}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1.1111112, y: 1.1718752, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 8183403965069105112}
|
||||
|
|
@ -316,8 +317,8 @@ RectTransform:
|
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 333.33353, y: 0.62475824}
|
||||
m_SizeDelta: {x: 100, y: 100}
|
||||
m_AnchoredPosition: {x: 300, y: -25}
|
||||
m_SizeDelta: {x: 80, y: 80}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &8183403963861912044
|
||||
CanvasRenderer:
|
||||
|
|
@ -526,7 +527,7 @@ MonoBehaviour:
|
|||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
speed: 340
|
||||
Grid: {fileID: 8994503876465136245, guid: 8d12e8c259faaf4499d94b55863d10a9, type: 3}
|
||||
Grid: {fileID: 2895109888218125691, guid: 29189dd9c413d634fab6cef95039358d, type: 3}
|
||||
--- !u!114 &-3822619241858280905
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
@ -781,7 +782,7 @@ RectTransform:
|
|||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8183403964692436329}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0.00003184316}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1.1111112, y: 1.1718752, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 8183403963777838365}
|
||||
|
|
@ -790,8 +791,8 @@ RectTransform:
|
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: -333.33353, y: 0.62475824}
|
||||
m_SizeDelta: {x: 100, y: 100}
|
||||
m_AnchoredPosition: {x: -300, y: -25}
|
||||
m_SizeDelta: {x: 80, y: 80}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &8183403964692436333
|
||||
CanvasRenderer:
|
||||
|
|
@ -1072,7 +1073,7 @@ RectTransform:
|
|||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8183403965182652615}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0.00003184316}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1.1111112, y: 1.1718752, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 8183403964253013195}
|
||||
|
|
@ -1081,8 +1082,8 @@ RectTransform:
|
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: -111.11105, y: 0.62475824}
|
||||
m_SizeDelta: {x: 100, y: 100}
|
||||
m_AnchoredPosition: {x: -100, y: -25}
|
||||
m_SizeDelta: {x: 80, y: 80}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &8183403965182652635
|
||||
CanvasRenderer:
|
||||
|
|
@ -1205,7 +1206,7 @@ RectTransform:
|
|||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8183403965183742969}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0.00003184316}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1.1111112, y: 1.1718752, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 8183403964783300134}
|
||||
|
|
@ -1214,8 +1215,8 @@ RectTransform:
|
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 111.111244, y: 0.62475824}
|
||||
m_SizeDelta: {x: 100, y: 100}
|
||||
m_AnchoredPosition: {x: 100, y: -25}
|
||||
m_SizeDelta: {x: 80, y: 80}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &8183403965183742973
|
||||
CanvasRenderer:
|
||||
|
|
|
|||
|
|
@ -8,7 +8,13 @@ public class KingMove : MonoBehaviour
|
|||
|
||||
private Vector3 newPos;
|
||||
private Vector3 MountCent = new Vector3(-4500, 620, 510);
|
||||
public GameObject Grid;
|
||||
private GameObject Grid;
|
||||
|
||||
void Start()
|
||||
{
|
||||
Grid = GameObject.FindGameObjectWithTag("KingGrid");
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update() {
|
||||
float translation = Input.GetAxis("KingMove") * speed;
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ public class KingPlace : MonoBehaviour
|
|||
public GameObject HailSprite;
|
||||
public GameObject HailObject;
|
||||
public GameObject Slime;
|
||||
public GameObject Grid;
|
||||
private GameObject Grid;
|
||||
private GameObject Place;
|
||||
private GameObject PlaceTemp;
|
||||
private GameObject HailCorner;
|
||||
|
|
@ -41,6 +41,11 @@ public class KingPlace : MonoBehaviour
|
|||
private bool SlimePlacing = false;
|
||||
private int BoxSize = 20;
|
||||
|
||||
void Start()
|
||||
{
|
||||
Grid = GameObject.FindGameObjectWithTag("KingGrid");
|
||||
}
|
||||
|
||||
private void PlaceObject(int ID) {
|
||||
//Switch statement, ID-0 = Block,ID-1 = Hail,ID-2 = Slime
|
||||
switch (ID) {//Parses in the button clicked into the right object that the King is placing
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 4399d7276b3edf446ac51c5145539a5e
|
||||
guid: 3156de54e455b4348b2a6e79383383b0
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
fileFormatVersion: 2
|
||||
guid: d48485317ff858c4189d9c3a24830f42
|
||||
guid: 3c5f77adbd146274281d636352eb5018
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
fileFormatVersion: 2
|
||||
guid: b91f668477f6b3244b3fea3204e6cd87
|
||||
guid: a1c26807795a7ac4f83567455ce978ce
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
|
|
|
|||
|
|
@ -1,30 +0,0 @@
|
|||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
|
||||
public class RenameChildren : EditorWindow
|
||||
{
|
||||
private static readonly Vector2Int size = new Vector2Int(250, 100);
|
||||
private string childrenPrefix;
|
||||
private int startIndex;
|
||||
[MenuItem("GameObject/Rename children")]
|
||||
public static void ShowWindow()
|
||||
{
|
||||
EditorWindow window = GetWindow<RenameChildren>();
|
||||
window.minSize = size;
|
||||
window.maxSize = size;
|
||||
}
|
||||
private void OnGUI()
|
||||
{
|
||||
childrenPrefix = EditorGUILayout.TextField("Children prefix", childrenPrefix);
|
||||
startIndex = EditorGUILayout.IntField("Start index", startIndex);
|
||||
if (GUILayout.Button("Rename children"))
|
||||
{
|
||||
GameObject[] selectedObjects = Selection.gameObjects;
|
||||
for (int objectI = 0; objectI < selectedObjects.Length; objectI++)
|
||||
{
|
||||
Transform selectedObjectT = selectedObjects[objectI].transform;
|
||||
for (int childI = 0, i = startIndex; childI < selectedObjectT.childCount; childI++) selectedObjectT.GetChild(childI).name = $"{childrenPrefix}{i++}";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: a8434936019ab2641ac090dafefbeb3d
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -15,16 +15,16 @@ EditorUserSettings:
|
|||
value: 22424703114646680e0b0227036c6f1f05033f2b212d68252320092a
|
||||
flags: 0
|
||||
RecentlyUsedScenePath-3:
|
||||
value: 22424703114646680e0b0227036c78111b125507233d28242c20137df7ee3d2cfb
|
||||
value: 22424703114646680e0b0227036c7b151b180b6501273035202c1327d1e33136e7a923e7ee2e26
|
||||
flags: 0
|
||||
RecentlyUsedScenePath-4:
|
||||
value: 22424703114646680e0b0227036c7b151b180b6501273035202c1327d1e33136e7a923e7ee2e26
|
||||
value: 22424703114646680e0b0227036c6f02131b172b282d347e38271427fb
|
||||
flags: 0
|
||||
RecentlyUsedScenePath-5:
|
||||
value: 22424703114646680e0b0227036c6f02131b172b282d347e38271427fb
|
||||
flags: 0
|
||||
RecentlyUsedScenePath-6:
|
||||
value: 22424703114646680e0b0227036c6f02131b172b282d347e38271427fb
|
||||
value: 22424703114646680e0b0227036c78111b125507233d28242c20137df7ee3d2cfb
|
||||
flags: 0
|
||||
vcSharedLogLevel:
|
||||
value: 0d5e400f0650
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user