[Test]//测试双向引用 public void Test_TwoDirRefernce() { var playerID = 0; var model = BattleManager.Instance.GetPlayerModel(playerID); var cards = new int[] { 1, 2, 3, 4, 5 }; model.InitDeck(cards); var deckList = model.GetCardList(SiteType.Deck); var effect = new CardEffect(deckList[0], null, null, null); Assert.AreEqual(effect.GetCardHandle(), deckList[0]); Assert.AreEqual(effect.GetCard().GetPlayerID(), playerID); }