Пример #1
0
 private void Start()
 {
     CanMoveCamera = false;
     InstructionBubble.ClearOldEvents();
     StartDialogue(intro, introInstructions, mainCanvas, sphere, false);
     InstructionBubble.onInstruction += () => CanMoveCamera = true;
     StartSphereParticles();
 }
Пример #2
0
 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();
 }
Пример #3
0
    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);
    }
Пример #4
0
    // 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;
    }