예제 #1
0
        /// <summary>
        /// Creates a new Danmaku from the pool.
        /// </summary>
        public Danmaku Get(DanmakuConfig config)
        {
            CheckCapacity(1);
            var state = config.CreateState();

            InitialStates[ActiveCount] = state;
            Times[ActiveCount]         = 0f;
            var danmaku = new Danmaku(this, activeCountArray[0]++);

            danmaku.ApplyState(state);
            return(danmaku);
        }