added comments of bug on script and added basic menus, will need functioning selecting to complete them

This commit is contained in:
Lorenzo
2022-04-04 16:00:54 +02:00
parent 0ace8baa66
commit c5c5693078
331 changed files with 60678 additions and 805 deletions

View File

@@ -4,7 +4,7 @@ using UnityEngine;
public class Building : MonoBehaviour
{
public string buildingName = "building01";
public string buildingName;
public Outline outline;
void Awake(){
@@ -17,5 +17,21 @@ public class Building : MonoBehaviour
if(Selector.selectedBuilding == null){outline.enabled=false; return;}
outline.enabled = Selector.selectedBuilding == this;
Debug.Log(buildingName); // this function debugs 4 names and not always the one u clicked.
// SetRightUpgradeButton(); // function to let the button know what menu to open, also runs 4+ times.
}
/* void SetRightUpgradeButton(){
switch (buildingName)
{
case "Research Facility":
Debug.Log("research facility menu");
break;
case "Green House":
Debug.Log("green house menu");
break;
}
} */
}

View File

@@ -3,7 +3,9 @@ guid: b71079c276d1984cd82ae7c982fe5ca7
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
defaultReferences:
- upgradeButton: {fileID: 4294743825789405552, guid: ea111002cebe337428e3dc443d2393ff, type: 3}
- outline: {instanceID: 0}
executionOrder: 0
icon: {instanceID: 0}
userData:

View File

@@ -0,0 +1,18 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CloseMenuButton : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 1f597f1255d64df47b4f10991c14cd9b
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,20 +1,3 @@
/*
Original Script By: Ditzel
Youtube Video Link: https://www.youtube.com/watch?v=KkYco_7-ULA&ab_channel=DitzelGames
Uses of this script:
For controlling camera movement: Pan, zoom and rotate
How to use:
Set this on an empty game object positioned at (0,0,0) and attach your active camera.
The script only runs on mobile devices or the remote app.
DecreaseCameraPanSpeed - The more the value, the greater it slows the pan speed
Upper height (Zoom out restriction) - Relative to camera position (not worldspace)
Lower height (Zoom in restriction) - Relative to camera position (not worldspace)
------[CHANGE LOG]------
Edited by Kudoshi : 24/3/2021
- Added Zoom In Out restriction
- Added camera pan speed
*/
using UnityEngine;
class ScrollAndPinch : MonoBehaviour