예제 #1
0
    protected override IEnumerator _Tutorial()
    {
        dashedLine.gameObject.SetActive(true);
        circle.gameObject.SetActive(true);
        cockroach.transform.position = CameraUtils.RandomWorldPointOnScreen(Camera.main, .4f, .4f, 0);
        MicroMixFinger finger = MicroMixManager.Instance.finger;

        trap.GetComponent <RoachTrapItem>().SetVisible(false);
        finger.gameObject.SetActive(true);
        dashedLine.GetComponentInChildren <SpriteRenderer>().enabled = true;

        float angle = Random.Range(0, 360);

        cockroach.GetComponent <Animator>().enabled = false;
        cockroach.transform.rotation  = Quaternion.Euler(0, 0, angle);
        dashedLine.transform.rotation = Quaternion.Euler(0, 0, angle);
        dashedLine.transform.position = cockroach.transform.position;

        Vector3 direction = new Vector3(Mathf.Cos((angle + 90) * Mathf.Deg2Rad), Mathf.Sin((angle + 90) * Mathf.Deg2Rad));

        circle.transform.position = cockroach.transform.position + direction * 4;
        yield return(finger.ShakeToBack(cockroach.transform.position + direction * 4 - Vector3.up * .2f, cockroach.transform.position + direction * 4 + Vector3.up * .2f, .3f, .4f));

        lastVelocity = direction;
        finger.gameObject.SetActive(false);
        circle.gameObject.SetActive(false);
        dashedLine.GetComponentInChildren <SpriteRenderer>().enabled = false;
    }
예제 #2
0
    protected override IEnumerator _Tutorial()
    {
        canvasParent.sortingLayerName = "Default";
        MicroMixFinger finger = MicroMixManager.Instance.finger;

        finger.gameObject.SetActive(true);
        Vector3 offset = Vector3.left * 1.5f;

        for (int i = 0; i < buttons.Length; i++)
        {
            buttons[i].ToggleButtonInteractable(false);
        }

        for (int i = 0; i < buttons.Length; i++)
        {
            assemblyItem.Init(0, i);
            StartCoroutine(DelayParticlePlay(.4f, i));
            yield return(finger.ShakeToBack(buttons[i].transform.position + offset, buttons[i].transform.position, delay: .2f, time: .4f));

            assemblyItem.Activate(false);
            yield return(MicroMixManager.Instance.WaitSecondsPause(AssemblyLineItem.FADE_TIME * 2));
        }

        for (int i = 0; i < buttons.Length; i++)
        {
            buttons[i].ToggleButtonInteractable(true);
        }

        yield return(0);

        finger.gameObject.SetActive(false);
        canvasParent.sortingLayerName = "uGUI";
    }
예제 #3
0
    protected override IEnumerator _Tutorial()
    {
        MicroMixFinger finger = MicroMixManager.Instance.finger;

        finger.gameObject.SetActive(true);
        yield return(finger.MoveTo(inhaler.transform.position, inhaler.transform.position + Vector3.down * 2, .3f, .15f));

        for (int i = 0; i < 2; i++)
        {
            yield return(finger.ShakeToBack(inhaler.transform.position + Vector3.down * 2, inhaler.transform.position + Vector3.up * 1, 0, .3f));
        }

        finger.gameObject.SetActive(false);
    }
예제 #4
0
    protected override IEnumerator _Tutorial()
    {
        MicroMixFinger finger = MicroMixManager.Instance.finger;

        finger.gameObject.SetActive(true);

        Setup();
        PushButtonItem button = inhaler.GetComponentInChildren <PushButtonItem>();

        Vector3 offset = new Vector3(0, .5f);

        yield return(finger.ShakeToBack(button.transform.position + offset, button.transform.position + button.animDelta + offset, delay: .5f, time: 1f));

        finger.gameObject.SetActive(false);
    }
예제 #5
0
    private IEnumerator ShowFinger()
    {
        MicroMixFinger finger = MicroMixManager.Instance.finger;

        finger.gameObject.SetActive(true);
        Vector3 offset = new Vector3(0, .75f);

        inhalerButton.SetActive(true);
        yield return(finger.ShakeToBack(inhalerButton.transform.position, inhalerButton.transform.position + offset, delay: .5f, time: .5f));

        inhalerButton.SetActive(false);
        isPaused = false;
        finger.gameObject.SetActive(false);
        Destroy(petInstance);
    }
예제 #6
0
    protected override IEnumerator _Tutorial()
    {
        Setup(true);
        MicroMixFinger finger = MicroMixManager.Instance.finger;

        finger.gameObject.SetActive(true);
        for (int i = 0; i < dustItems.Length; i++)
        {
            dustItems[i].Randomize();
        }
        for (int i = 0; i < dustItems.Length; i++)         //Now point them all towards the trash
        {
            yield return(finger.ShakeToBack(dustItems[i].transform.position + Vector3.down, dustItems[i].transform.position + Vector3.up, .1f, .3f));
        }
        finger.gameObject.SetActive(false);
    }