示例#1
0
        public Component.ItemComponent CreateItem(Entity.ItemEntity entity, Vector3 barthPosition)
        {
            var itemComponent = _itemCreaterView.CreateItem(entity, barthPosition);

            _itemCreaterModel.AddFieldItem(itemComponent);

            return(itemComponent);
        }
示例#2
0
        public void Init(ScoreModel scoreModel)
        {
            _itemCreaterModel = new ItemCreaterModel(new Entity.ItemListEntity(_itemListData));
            _itemCreaterView.Init();
            _scoreModel     = scoreModel;
            NormalScoreItem = _itemCreaterModel.NormalScoreItem;

            Bind();
        }
示例#3
0
        public Component.ItemComponent CreateItem(Entity.ItemEntity itemEntity, Vector3 barthPosition)
        {
            var item = Instantiate(itemEntity.Component, barthPosition, Quaternion.identity);

            item.Init(itemEntity);

            item.OnGetItem.Subscribe(e =>
            {
                e.FXCreateEntity = new Entity.FXCreateEntity(e.GetPosition, Enum.FXType.Item, e.ItemColor);
                _onGetItem.OnNext(e);
            });

            return(item);
        }
示例#4
0
        public ItemComponent CreateItem(Entity.ItemEntity itemEntity, Vector3 position)
        {
            var item = Instantiate(itemEntity.Component, position, Quaternion.identity);

            item.Init(itemEntity);

            item.OnGetItem.Subscribe(e =>
            {
                _normalFieldItems.Remove(item);
                _specialItemCreater.SendTrigger(ItemCreaterMessage.REDUCE_SPECIAL_ITEM_INTERVAL);
                e.FXCreateEntity     = new Entity.FXCreateEntity(e.GetPosition, Enum.FXType.Item, e.ItemColor);
                _scoreModel.AddScore = e.Score;
                _onGetItem.OnNext(e);
            });


            return(item);
        }