기권

게임을 진행할 때 일시정지 버튼을 통해 게임에 기권을 할 수 있다. 게임 중에는 게임에서 나갈 수 없으며, 게임에 기권하면 패배하게 된다.

기권을 하는 동시에 기권을 송신한다. 기권을 할 경우에 플레이어는 데미지를 100을 받게 되고 죽게 된다.

    //기권
    public void Renounce()
    {
        byte[] send = new byte[1] {Convert.ToByte(200)};
        BackEndMatch.SendMessage(send);
        Sequence sequence = DOTween.Sequence()
            .AppendCallback(() =>
            {
                myBoss.Damaged(100);
                EntityManeger.Inst.SpawnDamage(100, myBoss.transform);
            });
        StartCoroutine(GameManager.Inst.GameOver(false));
    }

수신하는 부분은 상대방이 데미지를 100 받고 끝나게 된다.

    public void renounce()
    {
        Sequence sequence = DOTween.Sequence()
            .AppendCallback(() =>
            {
                EntityManeger.Inst.otherBossEntity.Damaged(100);
                EntityManeger.Inst.SpawnDamage(100, EntityManeger.Inst.otherBossEntity.transform);
            });
        StartCoroutine(GameManager.Inst.GameOver(true));

    }