Beispiel #1
0
        //[Inject]
        public CardModel(IAssetDbService dbService)
        {
            Hp     = new ReactiveProperty <int>(Random.Range(1, 9));
            Mana   = new ReactiveProperty <int>(Random.Range(1, 9));
            Damage = new ReactiveProperty <int>(Random.Range(1, 9));

            IsDead = Hp.Select(x => x <= 0).ToReactiveProperty();

            Title = new ReactiveProperty <string>("Title");
            Desc  = new ReactiveProperty <string>("Description");

            var cards = dbService.GetCards();

            CardArt = new ReactiveProperty <Sprite>(cards[Random.Range(0, cards.Count)]);
        }
Beispiel #2
0
 public void Ctor(IAssetDbService assetDb)
 {
     _assetDb = assetDb;
 }
Beispiel #3
0
 public void Ctor(IAssetDbService assetDbService)
 {
     _assetDbService = assetDbService;
 }
 public AssetDbController(IAssetDbService assetSer)
 {
     this.assetSer = assetSer;
 }