예제 #1
0
        /// <summary>
        /// コンストラクタ
        /// </summary>
        /// <param name="enParam">種別</param>
        /// <param name="inLength">対象フレーム数</param>
        /// <param name="clPos">座標</param>
        /// <param name="pclVec">各ベクトル</param>
        public ClsDatTween(EnmParam enParam, int inLength, ClsVector3 clPos, List <ClsVector3> pclVec)
        {
            this.mParam  = enParam;
            this.mLength = inLength;

            this.mPos = new ClsVector3();
            if (clPos != null)
            {
                this.mPos.X = clPos.X;
                this.mPos.Y = clPos.Y;
            }

            this.mListVec = new List <ClsVector3>();
            if (pclVec != null)
            {
                int inCnt;
                for (inCnt = 0; inCnt < 3; inCnt++)
                {
                    ClsVector3 clVec = new ClsVector3(pclVec[inCnt].X, pclVec[inCnt].Y, 0.0f);
                    this.mListVec.Add(clVec);
                }
            }

            this.mImage = ClsDatTween.CreateImage(this, 15, 15);
        }
예제 #2
0
        /// <summary>
        /// トゥイーン情報を出力用データに変換する処理
        /// </summary>
        /// <param name="clTween">トゥイーン情報</param>
        public static void CreateTweenWeight(ClsDatTween clTween)
        {
            if (clTween == null)
            {
                return;
            }

            byte[] puchRate = new byte[ClsDatTween.MAX_WEIGHT];

            int    inWidth  = ClsDatTween.MAX_WEIGHT;
            int    inHeight = byte.MaxValue;
            Bitmap clImage  = ClsDatTween.CreateImage(clTween, inWidth, inHeight);

            //以下、出力用データ作成処理
            int inX, inY;

            for (inX = 0; inX < inWidth; inX++)
            {
                for (inY = 0; inY < inHeight; inY++)
                {
                    Color stColor = clImage.GetPixel(inX, inY);
                    if (stColor.A != 0)
                    {
                        continue;
                    }

                    puchRate[inX] = (byte)inY;
                    break;
                }
            }

            clTween.mRate = puchRate;
        }
예제 #3
0
        public byte[] mRate = null; //要素数MAX_X個のリスト

        /// <summary>
        /// コンストラクタ
        /// </summary>
        /// <param name="enParam">種別</param>
        /// <param name="inLength">対象フレーム数</param>
        /// <param name="clPos">座標</param>
        /// <param name="pclVec">各ベクトル</param>
        public ClsDatTween(EnmParam enParam, int inLength)
        {
            this.mParam  = enParam;
            this.mLength = inLength;

            this.mPos   = new ClsVector3();
            this.mPos.X = ClsDatTween.POS_X1;
            this.mPos.Y = ClsDatTween.POS_Y1;

            this.mListVec = new List <ClsVector3>();
            ClsVector3 clVec = new ClsVector3(ClsDatTween.VEC_X0, ClsDatTween.VEC_Y0, 0.0f);

            this.mListVec.Add(clVec);
            clVec = new ClsVector3(ClsDatTween.VEC_X1, ClsDatTween.VEC_Y1, 0.0f);
            this.mListVec.Add(clVec);
            clVec = new ClsVector3(ClsDatTween.VEC_X2, ClsDatTween.VEC_Y2, 0.0f);
            this.mListVec.Add(clVec);

            this.mImage = ClsDatTween.CreateImage(this, 15, 15);
        }