Example #1
0
    public void OnClickBtnLogin()
    {
        Class_Singleton_Sound.GetInst().Play("ClickSound_2");
        mIdComment       = InputId.text;
        mPasswordComment = InputPassword.text;

        tUser.mUserName = mIdComment;

        byte[] tBuffer     = new byte[1024];
        byte   tProtocolID = (byte)PROTOCOL.REQ_LOGIN;

        byte tIdLength = (byte)mIdComment.Length;

        byte[] tId = Encoding.UTF8.GetBytes(mIdComment);

        byte tPasswordLength = (byte)mPasswordComment.Length;

        byte[] tPassword = Encoding.UTF8.GetBytes(mPasswordComment);

        tBuffer[0] = tProtocolID;
        tBuffer[1] = tIdLength;
        tId.CopyTo(tBuffer, 2);
        tBuffer[tBuffer[1] + 2] = tPasswordLength;
        tPassword.CopyTo(tBuffer, tBuffer[1] + 3);

        Class_NetworkClient.GetInst().Send(tBuffer, tBuffer.Length);
    }
 public static Class_Singleton_Sound GetInst()
 {
     if (mInstance == null)
     {
         mInstance = new Class_Singleton_Sound();
     }
     return(mInstance);
 }
Example #3
0
 private void OnTriggerEnter(Collider tCollider)
 {
     if (tCollider.CompareTag("TagItem"))
     {
         Class_Singleton_Sound.GetInst().Play("EatItem");
         tCount -= 1;
         Destroy(tCollider.gameObject);
     }
 }
Example #4
0
    void DoAttack()
    {
        Class_Singleton_Sound.GetInst().Play("WizardAttack");
        Class_WizardAttack tAttack = Instantiate(PFAttack, mpAttackPos.transform.position, Quaternion.identity);

        tAttack.GetComponent <Rigidbody>().AddForce(this.transform.forward * 30, ForceMode.Impulse);

        Destroy(tAttack.gameObject, 3);
    }
Example #5
0
    private void Awake()
    {
        foreach (var S in mSoundList)
        {
            Class_Singleton_Sound.GetInst().DoRegist(S);
        }

        GameObject.DontDestroyOnLoad(this.gameObject);
    }
Example #6
0
    public void OnClickBtnCharactor()
    {
        Class_Singleton_Sound.GetInst().Play("ClickSound");

        Debug.Log("2P");
        mPlayer_1 = true;
        mPlayer_0 = false;

        mpOkBtn_1.gameObject.SetActive(true);
        mpOkBtn_0.gameObject.SetActive(false);
    }
Example #7
0
    public void OnClickBtnClick()
    {
        Class_Singleton_Sound.GetInst().Play("ClickSound_2");
        Debug.Log("Game Clear");
        Time.timeScale = 1.0f;
        byte[] tBuffer = new byte[1024];

        tBuffer[0] = (byte)PROTOCOL.REQ_GAME_CLEAR;

        Class_NetworkClient.GetInst().Send(tBuffer, tBuffer.Length);
    }
Example #8
0
 void OnTriggerEnter(Collider tCollider)
 {
     if (mpPlayer.tSpace == 1)
     {
         if (tCollider.CompareTag("TagEnemy"))
         {
             Class_Singleton_Sound.GetInst().Play("Damage");
             tCollider.GetComponent <Class_Enemy>().DamageStart();
             tCollider.GetComponent <Class_Enemy>().mEnemyHP -= Class_NetworkClient.GetInst().mMyUserInfo.mAP;
         }
     }
 }
    public void OnClickBtnJoinRoom()
    {
        Class_Singleton_Sound.GetInst().Play("ClickSound_2");

        byte[] tBuffer = new byte[1024];

        byte tProtocolID = (byte)PROTOCOL.REQ_JOIN_ROOM;

        tBuffer[0] = tProtocolID;

        Class_NetworkClient.GetInst().Send(tBuffer, tBuffer.Length);
    }
Example #10
0
    public void OnClickBtnReady()
    {
        Class_Singleton_Sound.GetInst().Play("ClickSound_2");
        mReadyBtn.gameObject.SetActive(false);

        byte[] tBuffer = new byte[1024];

        byte tProtocolID = (byte)PROTOCOL.REQ_READY;

        tBuffer[0] = tProtocolID;

        Class_NetworkClient.GetInst().Send(tBuffer, tBuffer.Length);
    }
Example #11
0
 private void OnTriggerEnter(Collider tCollider)
 {
     if (tCollider.CompareTag("TagPlayer"))
     {
         Class_Singleton_Sound.GetInst().Play("GameClear");
         mBntClear.gameObject.SetActive(true);
         Time.timeScale = 0.0f;
     }
     else if (tCollider.CompareTag("TagOtherPlayer"))
     {
         Class_Singleton_Sound.GetInst().Play("GameClear");
         mBntClear.gameObject.SetActive(true);
         Time.timeScale = 0.0f;
     }
 }
Example #12
0
    void OnTriggerEnter(Collider tCollider)
    {
        if (tCollider.CompareTag("TagEnemy"))
        {
            Class_Singleton_Sound.GetInst().Play("Damage");

            tCollider.GetComponent <Class_Enemy>().DamageStart();

            tCollider.GetComponent <Class_Enemy>().mEnemyHP -= Class_NetworkClient.GetInst().mMyUserInfo.mAP;

            Destroy(this.gameObject);
        }

        if (tCollider.CompareTag("TagWall"))
        {
            Destroy(this.gameObject);
        }
    }
Example #13
0
    private void OnTriggerEnter(Collider tCollider)
    {
        if (tCollider.CompareTag("TagPlayer"))
        {
            Class_Singleton_Sound.GetInst().Play("StageClear");

            this.gameObject.SetActive(false);
            mBridge.gameObject.SetActive(true);

            OnStageClear();
        }
        else if (tCollider.CompareTag("TagOtherPlayer"))
        {
            Class_Singleton_Sound.GetInst().Play("StageClear");

            this.gameObject.SetActive(false);
            mBridge.gameObject.SetActive(true);
        }
    }
 protected Class_Singleton_Sound()
 {
     mInstance = null;
 }
Example #15
0
 public void AttackSound()
 {
     Class_Singleton_Sound.GetInst().Play("WarriorAttack");
 }
Example #16
0
 public void DamageStart()
 {
     Class_Singleton_Sound.GetInst().Play("Damage");
     anim.SetBool("Damage", true);
 }