Пример #1
0
        public ActionResult Index()
        {
            CollectionLoader component = new CollectionLoader();
            HomeModel        model     = new HomeModel();

            return(View(model));
        }
Пример #2
0
    // Use this for initialization
    void Start()
    {
        float xPos = 0F;
        float yPos = 0F;

        float scale   = 0.25F;
        float xOffset = scale * 10F;
        //float rotation = 6F;

        int         handId = 0;
        List <Card> hand   = new List <Card>();

        hand = CollectionLoader.LoadCollection();

        for (int i = 0; i < 3; i++)
        {
            Card       card      = hand[i];
            GameObject cardClone = Instantiate(cardPrefab, new Vector3(0F, 0F, 0F), Quaternion.Euler(0, 0, 0)) as GameObject;

            SpawnCard SpawnCard = new SpawnCard();

            SpawnCard.CreateCard(cardClone, card, manaPrefab);
            cardClone.name                    = handId.ToString();
            cardClone.transform.parent        = transform;
            cardClone.transform.localPosition = new Vector3(xPos, yPos, (float)-handId);
            cardClone.transform.localScale    = new Vector3(scale, scale, 0.5F);

            xPos   += xOffset;
            handId += 1;
        }
    }
Пример #3
0
        public ModelController(ModelControllerConfig config, ModelData modelData,
                               ModelLoader modelLoader, CollectionLoader collectionLoader,
                               ItemLoader itemLoader, PartLoader partLoader)
        {
            this.config           = config;
            this.modelData        = modelData;
            this.collectionLoader = collectionLoader;
            this.modelLoader      = modelLoader;
            this.itemLoader       = itemLoader;
            this.partLoader       = partLoader;

            InitSpawnRatios();
        }
 /// <summary>
 /// Create the <see cref="CollectionLoader" />
 /// </summary>
 /// <param name="factory"></param>
 /// <returns></returns>
 protected override ICollectionInitializer CreateCollectionInitializer(ISessionFactoryImplementor factory)
 {
     Loader.Loader nonbatchLoader = new CollectionLoader(this, factory);
     if (batchSize > 1)
     {
         Loader.Loader batchLoader      = new CollectionLoader(this, batchSize, factory);
         int           smallBatchSize   = ( int )Math.Round(Math.Sqrt(batchSize));
         Loader.Loader smallBatchLoader = new CollectionLoader(this, smallBatchSize, factory);
         // the strategy for choosing batch or single load:
         return(new BatchingCollectionInitializer(this, batchSize, batchLoader, smallBatchSize, smallBatchLoader, nonbatchLoader));
     }
     else
     {
         // don't do batch loading
         return(( ICollectionInitializer )nonbatchLoader);
     }
 }
Пример #5
0
    void OnMouseDown()
    {
        if (mouseOver)
        {
            PlayerManager pm    = new PlayerManager();
            Board         board = PlayerManager.player.Board;

            List <Card> cardList = new List <Card>();
            cardList = CollectionLoader.LoadCollection();

            if (PlayerManager.selectionId >= 0)
            {
                string parentName = transform.parent.name;

                //int tileId = int.Parse(parentName.Substring(parentName.LastIndexOf("Tile_") + 1));
                int tileId = int.Parse(parentName.Substring(5));
                board.summonUnit(tileId, cardList[PlayerManager.selectionId]);
                PlayerManager.selectionId = -1;
            }
        }
    }
Пример #6
0
    // Use this for initialization
    void Start()
    {
        List <Card> cardCollection = new List <Card>();

        cardCollection = CollectionLoader.LoadCollection();

        float xPos = -4F;

        foreach (Card card in cardCollection)
        {
            GameObject cardClone = Instantiate(cardPrefab, new Vector3(0F, 0F, 0F), Quaternion.Euler(0, 0, 0)) as GameObject;

            SpawnCard SpawnCard = new SpawnCard();

            SpawnCard.CreateCard(cardClone, card, manaPrefab);

            cardClone.name                    = "Card_" + card.Id;
            cardClone.transform.parent        = transform;
            cardClone.transform.localPosition = new Vector3(xPos, 0F, 0F);
            cardClone.transform.localScale    = new Vector3(0.35F, 0.35F, 0.5F);

            xPos += 4;
        }
    }
Пример #7
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="beatmapBase">Object that</param>
 public OsuFileIo(Beatmap beatmapBase)
 {
     OsuDatabase      = new OsuDatabase(beatmapBase);
     CollectionLoader = new CollectionLoader(OsuDatabase.LoadedMaps);
     ScoresLoader     = new ScoresDatabaseIo(ScoresDatabase);
 }
Пример #8
0
 public ModelLoader(PrefsWrapper wrapper, CollectionLoader collectionLoader, PartLoader partLoader)
 {
     this.wrapper          = wrapper;
     this.collectionLoader = collectionLoader;
     this.partLoader       = partLoader;
 }