Esempio n. 1
0
        int ChangeforceInterval = 120;                     //每120帧产生一种随机力
        /// <summary>
        /// 生成一个花瓣粒子
        /// </summary>
        /// <param name="_t">纹理器</param>
        /// <param name="random">随机器</param>
        /// <param name="color">颜色选择(现已无用,任意填写)</param>
        /// <param name="position">坐标</param>
        /// <param name="w_h">宽度以及高度(宽高相等)</param>
        public FlyingFlower(TextureManager _t, Random random, int color, Vector2D position, float w_h = 16)
        {
            this.random = random;
            int select = random.Next(4);

            Body       = new FLowerBody(_t, w_h);
            Position.X = position.X; Position.Y = position.Y;
            //生成随机数据
            CreteRandomData();
        }
Esempio n. 2
0
        float UpSpeed = 0; //垂直方向上的速度

        #endregion Fields

        #region Constructors

        /// <summary>
        /// 生成一个花瓣粒子
        /// </summary>
        /// <param name="_t">纹理器</param>
        /// <param name="random">随机器</param>
        /// <param name="color">颜色选择(现已无用,任意填写)</param>
        /// <param name="position">坐标</param>
        /// <param name="w_h">宽度以及高度(宽高相等)</param>
        public FlyingFlower(TextureManager _t, Random random , int color ,Vector2D position , float w_h = 16)
        {
            this.random = random;
            int select = random.Next(4);
            Body = new FLowerBody(_t,w_h);
            Position.X = position.X; Position.Y = position.Y;
            //生成随机数据
            CreteRandomData();
        }