56 lines
1.2 KiB
C#
56 lines
1.2 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using static Unity.VisualScripting.Metadata;
|
|
|
|
public class ObjectSelectionAvoid : MonoBehaviour
|
|
{
|
|
public GameObject unselectedArrow;
|
|
public GameObject selectedArrowAvoid;
|
|
public GameObject selectedArrowSafe;
|
|
|
|
public bool selected =false;
|
|
|
|
// Start is called before the first frame update
|
|
void Start()
|
|
{
|
|
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
|
|
}
|
|
|
|
public void selectUnSelectObject(GameObject currentGameObject)
|
|
{
|
|
if (selected == false)
|
|
{
|
|
selected = true;
|
|
unselectedArrow.SetActive(false);
|
|
selectedArrowAvoid.SetActive(true);
|
|
|
|
} else if (selected == true)
|
|
{
|
|
selected = false;
|
|
unselectedArrow.SetActive(true);
|
|
selectedArrowAvoid.SetActive(false);
|
|
}
|
|
|
|
}
|
|
|
|
/* List<GameObject> foundObjects = new List<GameObject>();
|
|
GameObject[] allObjects = GameObject.FindObjectsOfType<GameObject>(true);
|
|
|
|
foreach (GameObject obj in allObjects)
|
|
{
|
|
if (obj.CompareTag("selectingSignifier"))
|
|
{
|
|
obj.SetActive(true);
|
|
}
|
|
}
|
|
*/
|
|
|
|
}
|