コード例 #1
0
ファイル: Seeker.cs プロジェクト: nubington/bill
        public MouseSeeker(Vector2 position, float speed, int mouseSize, int cordSize, int length, float directionAngle, float rotationSpeed)
            : base(position, speed, mouseSize, length, directionAngle, rotationSpeed)
        {
            //Seeker.Seekers.Remove(frontBit);
            //Bits.Remove(frontBit);
            //frontBit = new DirectionalSeeker(position, mouseSize, Angle, directionAngle, speed, rotationSpeed);
            //frontBit.CenterPoint = position;
            //Bits.Insert(0, frontBit);
            Bits[0]              = new DirectionalSeeker(position, mouseSize, Angle, directionAngle, speed, rotationSpeed);
            frontBit             = Bits[0];
            frontBit.CenterPoint = position;
            frontBit.SeekOnce    = true;
            frontBit.Texture     = MouseTexture;
            Bits[1].Target       = frontBit;

            for (int i = 1; i < length - 1; i++)
            {
                Bits[i].Texture     = CordTexture;
                Bits[i].Width       = Bits[i].Height = cordSize;
                Bits[i].CenterPoint = position;
            }

            Seeker plug = Bits[length - 1];

            plug.Texture     = PlugTexture;
            plug.Width       = plug.Height = cordSize * 2;
            plug.CenterPoint = position;

            MouseSeekers.Add(this);
        }
コード例 #2
0
ファイル: Seeker.cs プロジェクト: nubington/bill
        public MouseSeeker(Vector2 position, float speed, int mouseSize, int cordSize, int length, float directionAngle, float rotationSpeed)
            : base(position, speed, mouseSize, length, directionAngle, rotationSpeed)
        {
            //Seeker.Seekers.Remove(frontBit);
            //Bits.Remove(frontBit);
            //frontBit = new DirectionalSeeker(position, mouseSize, Angle, directionAngle, speed, rotationSpeed);
            //frontBit.CenterPoint = position;
            //Bits.Insert(0, frontBit);
            Bits[0] = new DirectionalSeeker(position, mouseSize, Angle, directionAngle, speed, rotationSpeed);
            frontBit = Bits[0];
            frontBit.CenterPoint = position;
            frontBit.SeekOnce = true;
            frontBit.Texture = MouseTexture;
            Bits[1].Target = frontBit;

            for (int i = 1; i < length - 1; i++)
            {
                Bits[i].Texture = CordTexture;
                Bits[i].Width = Bits[i].Height = cordSize;
                Bits[i].CenterPoint = position;
            }

            Seeker plug = Bits[length - 1];
            plug.Texture = PlugTexture;
            plug.Width = plug.Height = cordSize * 2;
            plug.CenterPoint = position;

            MouseSeekers.Add(this);
        }