private void Awake() { hint = GameObject.Find("HintButton").GetComponent<Button>(); canvas = GameObject.Find("Canvas"); detector = FindObjectOfType<Detector>(); solutionDetector = FindObjectOfType<SolutionDetector>(); emitterCone = FindObjectOfType<EmitterCone>(); emitterConeSol = FindObjectOfType<EmitterConeSol>(); atomsManager = FindObjectOfType<AtomsManager>(); solutionManager = FindObjectOfType<SolutionManager>(); moleculeManager = FindObjectOfType<MoleculeManager>(); wave = FindObjectOfType<Wave>(); hintArrow = FindObjectOfType<HintArrow>(); }
public void EnableHint(Texture2D tex = null) { if (activeHint != null) { return; } DisableHint(); PairInt hintPosition; PairInt hintDirection; if (!FindMatch(out hintPosition, out hintDirection)) { return; } activeHint = CreateHintArrow(); activeHint.hintPosition = hintPosition; activeHint.hintDirection = hintDirection; activeHint.tex = tex; }