Exemplo n.º 1
0
    private void ShowNext()
    {
        nextButton.SetActive(true);
        List <GameObject> pageList = quizObject[slot.index].pageList;

        for (int i = 0; i < pageList.Count; i++)
        {
            pageList[i].gameObject.SetActive(false);
        }


        //페이지 남음.
        if (index < pageList.Count)
        {
            pageList[index].SetActive(true);
        }
        else
        {
            pageList[pageList.Count - 1].SetActive(true);
            nextButton.SetActive(false);
            teamButtonObject.SetActive(true);

            SoundMgr.PlaySound(SoundMgr.SoundType.question_end);;
        }
    }
Exemplo n.º 2
0
 public void SceneLoad()
 {
     if (FadeOutAnimator.enabled == false)
     {
         m_SoundMgr.PlaySound(1);
         FadeOutAnimator.enabled = true;
         m_SoundMgr.SoundFadeOut(2.0f, 0);
         StartCoroutine("Delay");
     }
 }
Exemplo n.º 3
0
    IEnumerator bird()
    {
        while (bBird)
        {
            float x0 = 400 * Mathf.Sin(UnityEngine.Random.Range(0, 6.28f));
            float z0 = 400 * Mathf.Cos(UnityEngine.Random.Range(0, 6.28f));

            SoundMgr.PlaySound(clipBird, new Vector3(x0, 0, z0));

            yield return(new WaitForSeconds(UnityEngine.Random.Range(4, 8)));
        }
    }
Exemplo n.º 4
0
    void OnTriggerEnter(Collider other)
    {
        if (other.gameObject.layer == LayerMask.NameToLayer("Crash"))
        {
            if (!p.isResetPlayer)
            {
                sm.LifeContol();
                p.Crash();

                SoundMgr.PlaySound(SoundType.damage);
            }
        }
        else if (other.gameObject.layer == LayerMask.NameToLayer("Falling"))
        {
            if (!p.isResetPlayer)
            {
                p.Falling();
            }
        }
        else if (other.gameObject.layer == LayerMask.NameToLayer("Slide"))
        {
            if (!p.GetSlideState())
            {
                if (!p.isResetPlayer)
                {
                    sm.LifeContol();
                    p.Crash();

                    SoundMgr.PlaySound(SoundType.damage);
                }
            }
        }
        else if (other.gameObject.layer == LayerMask.NameToLayer("Coin"))
        {
            sm.CardGaugeUp();
            other.GetComponent <Renderer>().enabled = false;//gameObject.SetActive(false);
            other.GetComponent <Collider>().enabled = false;
            p.CoinGetEffect();

            SoundMgr.PlaySound(SoundType.coin);
            //Destroy(other.gameObject);
        }
        //else if (other.gameObject.layer == LayerMask.NameToLayer("Card"))
        //{
        //    //other.transform.parent.gameObject.SetActive(false);

        //    other.transform.parent.SetParent(p.transform.Find("Main Camera/CardDest"));
        //    other.transform.GetComponent<CardItem>().MoveCard();

        //    p.PlayerGetCard();
        //    sm.CardCapture();
        //}
    }
Exemplo n.º 5
0
    public override void Combo3Damage()
    {
        Vector3    TargetVec = RotateAngle == 0.0f ? gameObject.transform.position + Vector3.right * AttackRange : gameObject.transform.position + Vector3.left * AttackRange;
        GameObject LoadedObj = Instantiate <GameObject>(CResourceMgr.LoadEffect("Arrows3"), gameObject.transform.position, new Quaternion());
        CArrows    Arrows    = LoadedObj.GetComponent <CArrows>();

        Arrows.Owner   = gameObject;
        Arrows.end_pos = TargetVec;
        CCombo3Ani ani = gameObject.GetComponentInChildren <CCombo3Ani>();

        Arrows.HitMove    = ani.HitMove;
        Arrows.HitAniType = EHitAniType.Type3;
        SoundMgr.PlaySound("Missile", ESoundType.Motion);
    }
Exemplo n.º 6
0
    public override void Combo3Damage()
    {
        Vector3    TargetVec = RotateAngle == 0.0f ? gameObject.transform.position + Vector3.right * AttackRange : gameObject.transform.position + Vector3.left * AttackRange;
        GameObject LoadedObj = Instantiate <GameObject>(CResourceMgr.LoadEffect("IceBolt"), gameObject.transform.position, new Quaternion());
        CIceBolt   IceBolt   = LoadedObj.GetComponent <CIceBolt>();

        IceBolt.Owner  = gameObject;
        IceBolt.EndPos = TargetVec;
        CCombo3Ani ani = gameObject.GetComponentInChildren <CCombo3Ani>();

        IceBolt.HitMove    = ani.HitMove;
        IceBolt.HitAniType = EHitAniType.Type3;
        SoundMgr.PlaySound("Razor", ESoundType.Motion);
    }
Exemplo n.º 7
0
    public override void ParringAttackDamage()
    {
        Vector3        pos        = RotateAngle == 0.0f ? gameObject.transform.position + Vector3.right : gameObject.transform.position + Vector3.left;
        GameObject     TriggerObj = Instantiate <GameObject>(CResourceMgr.LoadTrigger("DamageCircleTrigger"), pos, Quaternion.identity);
        CDamageTrigger Trigger    = TriggerObj.GetComponent <CDamageTrigger>();

        Trigger.Owner = gameObject;
        CSturnAni ani = gameObject.GetComponentInChildren <CSturnAni>();

        Trigger.AliveTime = 0.1f;
        Trigger.Damage    = 10;
        Trigger.ApplyAliveTime();
        Trigger.bSturn     = true;
        Trigger.HitAniType = EHitAniType.Type1;
        SoundMgr.PlaySound("Attack", ESoundType.Motion);
    }
Exemplo n.º 8
0
    public override bool Dodge(Vector3 GoalPos)
    {
        if (Stamina < 40.0f)
        {
            return(false);
        }

        bool bDodge = base.Dodge(GoalPos);

        if (bDodge)
        {
            Stamina -= 40.0f;
            SoundMgr.PlaySound("Jump", ESoundType.Motion);
        }
        return(bDodge);
    }
Exemplo n.º 9
0
    public void CardGaugeUp()
    {
        cardGauge++;

        if (cardGauge > 250)
        {
            currentSpeed = player.GetComponentInParent <Player>().playSpeed = 2.2f;

            LoadFile.Lv3();
        }

        meter[0].sprite = counts[cardGauge % 10];
        meter[1].sprite = counts[cardGauge / 10 % 10];
        meter[2].sprite = counts[cardGauge / 100 % 10];
        meter[3].sprite = counts[cardGauge / 1000];

        if (!isFinish)
        {
            gauge.fillAmount = cardGauge / (float)CardGaugeLimit;

            if (CardGaugeLimit <= cardGauge)
            {
                //cardGauge = 0;
                //cardCapture.sprite = cardCaptureSprite[1];

                cardEffect.SetActive(true);
                Invoke("CardEffectOff", 0.2f);

                //카드 생성
                CardObj.SetActive(true);
                CardObj.transform.parent        = player.transform.Find("Card_Pos");
                CardObj.transform.localPosition = Vector3.forward;
                CardObj.transform.localScale    = Vector3.one;
                //>

                StartCoroutine(MovingCard());

                SoundMgr.PlaySound(SoundType.card);

                //CoinsActive(false);
            }
        }
    }
Exemplo n.º 10
0
 private void Update()
 {
     if (Input.GetKeyDown(KeyCode.A))
     {
         scoreUI.Show(allList, false);
     }
     else if (Input.GetKeyDown(KeyCode.Z))
     {
         SoundMgr.PlaySound(SoundMgr.SoundType.sound_buttion_right);
     }
     else if (Input.GetKeyDown(KeyCode.X))
     {
         SoundMgr.PlaySound(SoundMgr.SoundType.sound_buttion_wrong);
     }
     else if (Input.GetKeyDown(KeyCode.C))
     {
         SoundMgr.PlaySound(SoundMgr.SoundType.answer_confirm);
     }
 }
Exemplo n.º 11
0
    public override bool Hit(int inDamage, GameObject Attacker, float HitMove, bool bSturn, EHitAniType HitAniType)
    {
        CDebugLog.Log(ELogType.Character, "Hit EnemyCharacter");

        bool bHit = base.Hit(inDamage, Attacker, HitMove, bSturn, HitAniType);

        if (bHit)
        {
            if (curState == EState.Die)
            {
                SoundMgr.PlaySound("Die2", ESoundType.Motion);
            }
            else
            {
                SoundMgr.PlaySound("Digital_Sword", ESoundType.Motion);
            }
        }

        return(bHit);
    }
Exemplo n.º 12
0
    public void ClickSlot()
    {
        if (stateType == StateType.Opening)
        {
            return;
        }
        if (stateType == StateType.Lock)
        {
            SoundMgr.PlaySound(SoundMgr.SoundType.SlotOpen);
        }
        else if (stateType == StateType.Ready)
        {
            SoundMgr.PlaySound(SoundMgr.SoundType.SlotEnter);
        }

        if (callback != null)
        {
            callback(this);
        }
    }
Exemplo n.º 13
0
    public override void Combo2Damage()
    {
        Vector3    TargetVec   = RotateAngle == 0.0f ? gameObject.transform.position + Vector3.right * AttackRange : gameObject.transform.position + Vector3.left * AttackRange;
        Quaternion newRotation = CUtility.MakeQuaternion(gameObject.transform.position, TargetVec);

        // 이미지를 반시계방향으로 회전 시켜서 위로 바라 보게 만든다.
        Vector3 eulerAngles = newRotation.eulerAngles;

        eulerAngles.z += 90.0f;
        newRotation    = Quaternion.Euler(eulerAngles);

        GameObject LoadedObj = Instantiate <GameObject>(CResourceMgr.LoadEffect("IceBolt"), gameObject.transform.position, newRotation);
        CIceBolt   Effect    = LoadedObj.GetComponent <CIceBolt>();

        Effect.Owner  = gameObject;
        Effect.EndPos = TargetVec;
        CCombo1Ani ani = gameObject.GetComponentInChildren <CCombo1Ani>();

        Effect.HitMove    = ani.HitMove;
        Effect.HitAniType = EHitAniType.Type2;
        SoundMgr.PlaySound("Razor2", ESoundType.Motion);
    }
Exemplo n.º 14
0
    public override void Combo3Damage()
    {
        Vector3    TargetVec   = RotateAngle == 0.0f ? gameObject.transform.position + Vector3.right : gameObject.transform.position + Vector3.left;
        Quaternion newRotation = CUtility.MakeQuaternion(gameObject.transform.position, TargetVec);
        Vector3    pos         = gameObject.transform.position;

        pos.x = gameObject.transform.position.x + (TargetVec.x - pos.x) / 2.0f;
        pos.z = 1.0f;
        GameObject melee_trail = Instantiate <GameObject>(CResourceMgr.LoadEffect("SwordTrail"), pos, newRotation);

        melee_trail.transform.localScale = new Vector3(2.0f, 2.0f, 1.0f);
        CTrail trail = melee_trail.GetComponent <CTrail>();

        trail.Owner = gameObject;
        CCombo3Ani ani = gameObject.GetComponentInChildren <CCombo3Ani>();

        trail.HitMove    = ani.HitMove;
        trail.HitAniType = EHitAniType.Type3;
        ani.SpriteRendererNone();

        SoundMgr.PlaySound("Attack", ESoundType.Motion);
    }
Exemplo n.º 15
0
    public override void Combo1Damage()
    {
        Vector3    TargetVec   = RotateAngle == 0.0f ? gameObject.transform.position + Vector3.right * AttackRange : gameObject.transform.position + Vector3.left * AttackRange;
        Quaternion newRotation = CUtility.MakeQuaternion(gameObject.transform.position, TargetVec);

        // 이미지를 반시계방향으로 회전 시켜서 위로 바라 보게 만든다.
        Vector3 eulerAngles = newRotation.eulerAngles;

        eulerAngles.z += 90.0f;
        newRotation    = Quaternion.Euler(eulerAngles);

        GameObject LoadedObj = Instantiate <GameObject>(CResourceMgr.LoadEffect("Bone"), gameObject.transform.position, newRotation);
        CBone      Effect    = LoadedObj.GetComponent <CBone>();

        Effect.Owner  = gameObject;
        Effect.EndPos = TargetVec;
        CCombo1Ani ani = gameObject.GetComponentInChildren <CCombo1Ani>();

        Effect.HitMove    = ani.HitMove;
        Effect.HitAniType = EHitAniType.Type1;

        //Vector3 TargetVec = RotateAngle == 0.0f ? gameObject.transform.position + Vector3.right : gameObject.transform.position + Vector3.left;
        //Quaternion newRotation = CUtility.MakeQuaternion(gameObject.transform.position, TargetVec);

        //Vector3 pos = gameObject.transform.position;
        //pos.x = gameObject.transform.position.x + (TargetVec.x - pos.x) / 2.0f;
        //pos.z = 1.0f;
        //GameObject melee_trail = Instantiate<GameObject>(CResourceMgr.LoadEffect("SwordTrail"), pos, newRotation);

        //CTrail trail = melee_trail.GetComponent<CTrail>();
        //trail.Owner = gameObject;
        //CCombo1Ani ani = gameObject.GetComponentInChildren<CCombo1Ani>();
        //trail.HitMove = ani.HitMove;
        //trail.HitAniType = EHitAniType.Type1;
        ani.SpriteRendererNone();

        SoundMgr.PlaySound("Attack", ESoundType.Motion);
    }
Exemplo n.º 16
0
    public override void Combo1Damage()
    {
        CCombo1Ani ani = gameObject.GetComponentInChildren <CCombo1Ani>();

        ani.SpriteRendererNone();
        Vector3    TargetVec   = RotateAngle == 0.0f ? gameObject.transform.position + Vector3.right * AttackRange : gameObject.transform.position + Vector3.left * AttackRange;
        Quaternion newRotation = CUtility.MakeQuaternion(gameObject.transform.position, TargetVec);

        // 이미지를 반시계방향으로 회전 시켜서 위로 바라 보게 만든다.
        Vector3 eulerAngles = newRotation.eulerAngles;

        eulerAngles.z += 90.0f;
        newRotation    = Quaternion.Euler(eulerAngles);

        GameObject ranged_object = Instantiate <GameObject>(CResourceMgr.LoadEffect("Arrow"), gameObject.transform.position, newRotation);
        CArrow     arrow         = ranged_object.GetComponent <CArrow>();

        arrow.Owner      = gameObject;
        arrow.EndPos     = TargetVec;
        arrow.HitAniType = EHitAniType.Type1;

        SoundMgr.PlaySound("Missile", ESoundType.Motion);
    }
Exemplo n.º 17
0
 void _play_sound()
 {
     SoundMgr.PlaySound("f0");
     EventMgr.startEvent("显示关闭按钮");
 }
Exemplo n.º 18
0
 private void OnEnable()
 {
     SoundMgr.PlaySound(soundType);
 }
Exemplo n.º 19
0
 public override void start()
 {
     SoundMgr.PlaySound(soundFile);
     isEnd = true;
 }