Ejemplo n.º 1
0
        //=====================================================================

        /// <summary>
        /// This is overridden to allow cloning of a PDI object
        /// </summary>
        /// <returns>A clone of the object</returns>
        public override object Clone()
        {
            RoleProperty o = new RoleProperty();

            o.Clone(this);
            return(o);
        }
Ejemplo n.º 2
0
    //初始化数据
    public void InitData()
    {
        for (int i = 0; i < roundData.Rules.Length; i++)
        {
            PerseRule(ref allPerseItem, roundData.Rules[i]);
            FillProfit(ref roundData.Profit, ref allPerseItem);
        }
        RoleProperty player     = GameData.Instance.SystemData.AllRoles[roundData.playerId];
        DeckProperty playerDeck = GameData.Instance.SystemData.AllDecks[player.DeckId];

        PlayerAtt = new RoleSystem
        {
            property = (RoleProperty)player.Clone(),
            Deck     = new List <int>(playerDeck.Deck),
        };
        RoleProperty npc     = GameData.Instance.SystemData.AllRoles[roundData.npcId];
        DeckProperty npcdeck = GameData.Instance.SystemData.AllDecks[npc.DeckId];

        NPCAtt = new RoleSystem
        {
            property = (RoleProperty)npc.Clone(),
            Deck     = new List <int>(npcdeck.Deck),
        };
    }
Ejemplo n.º 3
0
        //=====================================================================

        /// <summary>
        /// This is overridden to allow cloning of a PDI object
        /// </summary>
        /// <returns>A clone of the object</returns>
        public override object Clone()
        {
            RoleProperty o = new RoleProperty();
            o.Clone(this);
            return o;
        }