//Jimmy Vegas Unity Tutorial //These scripts will take your axe and stop your fading using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class AxeTake : MonoBehaviour { public float TheDistance; public GameObject ActionDisplay; public GameObject ActionText; public GameObject ExtraCursor; public GameObject FakeAxe; public GameObject RealAxe; void Update() { TheDistance = PlayerCasting.DistanceFromTarget; } void OnMouseOver() { if (TheDistance <= 3) { ActionText.GetComponent().text = "Take Axe"; ActionDisplay.SetActive(true); ActionText.SetActive(true); ExtraCursor.SetActive(true); } else { ActionText.GetComponent().text = ""; ActionDisplay.SetActive(false); ActionText.SetActive(false); ExtraCursor.SetActive(false); } if (Input.GetButtonDown("Action")) { if (TheDistance <= 3) { ActionText.GetComponent().text = ""; RealAxe.SetActive(true); FakeAxe.SetActive(false); ActionDisplay.SetActive(false); ActionText.SetActive(false); ExtraCursor.SetActive(false); Destroy(gameObject); } } } void OnMouseExit() { ActionText.GetComponent().text = ""; ActionDisplay.SetActive(false); ActionText.SetActive(false); ExtraCursor.SetActive(false); } } using System.Collections; using System.Collections.Generic; using UnityEngine; public class A01SceneStart : MonoBehaviour { public GameObject fadeInImg; void Start () { StartCoroutine(SceneWorks()); } IEnumerator SceneWorks() { yield return new WaitForSeconds(1.6f); fadeInImg.SetActive(false); } }