private void Start() { CanMoveCamera = false; InstructionBubble.ClearOldEvents(); StartDialogue(intro, introInstructions, mainCanvas, sphere, false); InstructionBubble.onInstruction += () => CanMoveCamera = true; StartSphereParticles(); }
public void ClickedSphere() { StopSphereParticle(); InstructionBubble.ClearOldEvents(); clickedOrb = true; //hallScript.canMoveAround = false; hallScript.MoveCameraBackButton.SetActive(false); StartDialogue(map, mapInstructions, mainCanvas, introTarget, true); InstructionBubble.onInstruction += () => AllowTownSelection(); HighlightAllTowns(); }
public void StartDialogue(List <string> dialogue, List <string> instruction, Canvas canvas, GameObject target, bool canvasElement) { if (clone != null) { clone.DestroyItem(); } clone = Instantiate(speechBubblePrefab, mainCanvas.transform) .GetComponentInChildren <InstructionBubble>(); clone.SetText(dialogue, instruction); clone.Init(target, canvasElement, canvas); }
// Use this for initialization void Awake() { diverFeet = GameObject.Find("DiverGround"); animator = GetComponent <Animator> (); diver = GetComponent <Rigidbody2D> (); audio = GameObject.FindGameObjectWithTag("Spawner").GetComponent <AudioScript> (); camera = GameObject.Find("MainCamera").GetComponent <Camera> (); spawner = GameObject.FindGameObjectWithTag("Spawner").GetComponent <Spawner>(); instructions = GameObject.FindGameObjectWithTag("Instructions").GetComponent <InstructionBubble> (); walkForce = new Vector2(walkVelocity, 0f); jumpForce = new Vector2(0f, jumpVelocity); diver.velocity = Vector3.zero; }