コード例 #1
0
ファイル: Asda2PvpHandler.cs プロジェクト: 0xFh/Asda2-Project
        public void StopPvp()
        {
            if (!IsActive)
            {
                return;
            }
            IsActive = false;
            if (Losser == null)
            {
                Losser = FirstCharacter;
            }
            FirstCharacter.EnemyCharacters.Remove(SecondCharacter);
            SecondCharacter.EnemyCharacters.Remove(FirstCharacter);
            FirstCharacter.CheckEnemysCount();
            SecondCharacter.CheckEnemysCount();
            Asda2PvpHandler.SendDuelEndedResponse(Winner, Losser);

            Asda2TitleChecker.OnWinDuel(Winner);

            FirstCharacter.Asda2Duel            = null;
            SecondCharacter.Asda2Duel           = null;
            FirstCharacter.Asda2DuelingOponent  = null;
            SecondCharacter.Asda2DuelingOponent = null;
            FirstCharacter  = null;
            SecondCharacter = null;
        }
コード例 #2
0
    /// <summary>
    /// Create an instance of this class function
    /// </summary>
    private SecondCharacter()
    {
        if (_instance != null)
        {
            return;
        }

        _instance = this;
    }
コード例 #3
0
ファイル: FightDTO.cs プロジェクト: morgansmb/gotproject
        public Fight Transform()
        {
            Fight fight = new Fight();

            fight.FirstCharacter  = FirstCharacter.Transform();
            fight.SecondCharacter = SecondCharacter.Transform();
            fight.ID_Winner       = ID_Winner;
            fight.ID_Territory    = ID_Territory;
            fight.ID_War          = ID_War;

            return(fight);
        }