Esempio n. 1
0
 public void setStateLockDoor(bool val)
 {
     if (val && finishClose)
     {
         Debug.Log("mo cua ra");
         uIEventSystem.InactiveAll();
         floatingJoystick.StopMovement();
         finishOpen            = false;
         isStandingLockTrigger = val;
         StartCoroutine(OpenTheDoor());
     }
     else if (val && finishOpen)
     {
         Debug.Log("cua da mo roi, khong can mo nua");
         finishOpen            = true;
         isStandingLockTrigger = val;
         gateMap.enabled       = true;
     }
     else if (!val && finishOpen)
     {
         Debug.Log("chuan bi dong cua");
         finishClose           = false;
         isStandingLockTrigger = val;
         gateMap.enabled       = false;
         StartCoroutine(CloseTheDoor());
     }
     else if (!val && finishClose)
     {
         Debug.Log("cua da dong roi, khong can dong nua");
         finishClose           = true;
         isStandingLockTrigger = val;
         gateMap.enabled       = false;
     }
 }
Esempio n. 2
0
 private void OnCollisionEnter2D(Collision2D other)
 {
     if (other.collider.gameObject.tag.Equals("Player") && countmeet == 0)
     {
         //floatingJoystick. = false;
         floatingJoystick.StopMovement();
         StartStory();
     }
 }
 void playWaterParticle()
 {
     if (finishPlayParticle)
     {
         finishPlayParticle = false;
         uIEventSystem.InactiveAll();
         joystick.StopMovement();
         StartCoroutine(animWaterParticle());
     }
 }
Esempio n. 4
0
    IEnumerator StartActiveJikan()
    {
        uIEventSystem.InactiveAll();
        joystick.StopMovement();
        particleObject.SetActive(true);
        cameraController.offset = new Vector3(0f, 4f, -10f);
        cam.orthographicSize    = 8f;
        for (int i = 0; i < listFire.Length; i++)
        {
            listFire[i].Play();
            soundJikan.PlayMusic();
            yield return(new WaitForSeconds(1.5f));
        }
        smoke.Stop();
        boxCollider2D.enabled = false;
        yield return(new WaitForSeconds(1f));

        cameraController.offset = new Vector3(0f, 2f, -10f);
        cam.orthographicSize    = 5f;
        uIEventSystem.ActiveUIPlayGame();
    }
 // private void OnTriggerEnter2D(Collider2D other)
 // {
 //     if (other.gameObject.tag.Equals("BossZone") && !killBoss)
 //     {
 //         StartCoroutine(PillarActive(3f));
 //     }
 // }
 IEnumerator PillarActive(float speed)
 {
     soundPillar.PlayMusic();
     uIEventSystem.InactiveAll();
     joystick.StopMovement();
     while (pillars[0].position.y < heighPillar.position.y)
     {
         pillars[0].transform.Translate(Vector3.up * Time.deltaTime * speed);
         pillars[1].transform.Translate(Vector3.up * Time.deltaTime * speed);
         shakeCamera.shakeCamera(0.1f, 0.1f);
         cam.orthographicSize    = 10f;
         cameraController.offset = new Vector3(0f, 6f, -10f);
         yield return(null);
     }
     // pillarMove = false;
     // bossActive = true;
     // pillarTop = true;
     soundPillar.StopMusic();
     dragonObject.SetActive(true);
     setActiveUIBoss(true);
     dragonBehavior.stateDragon = 1;
     uIEventSystem.ActiveUIPlayGame();
 }
 void setStatePlayerDeath()
 {
     uIEventSystem.InactiveAll();
     joystick.StopMovement();
     uIEventSystem.ActiveUIDie(2f);
 }
Esempio n. 7
0
 void doUIChangeMap()
 {
     uIEventSystem.InactiveAll();
     joystick.StopMovement();
     uIEventSystem.ActiveUIChangeMap(6f);
 }