示例#1
0
        /// <summary>
        /// Create a new instance of raptor
        /// </summary>
        public Raptor()
        {
            // Setup controller:
            _controller = this.AddModule <GRIDController>();

            // Setup texture:
            _texture           = this.AddModule <SpritesheetTexture>();
            _texture.TextureID = "Raptor";

            // Setup collision box:
            _collisionBox = this.AddModule <CustomRectHitArea>();
            _collisionBox.SetBounds(new Rectangle(0, 0, 100, 100));
        }
示例#2
0
        /// <summary>
        /// Create a new instance of raptor
        /// </summary>
        public Flame(Vector2 dir)
        {
            // Setup texture:
            _texture           = this.AddModule <TextureModule>();
            _texture.TextureID = "flame";

            // Setup collision box:
            _collisionBox = this.AddModule <CustomRectHitArea>();
            _collisionBox.SetBounds(new Rectangle(0, 0, 100, 100));

            _deadCount = 0;
            _dir       = dir;
            _dir.X    *= 4;
            _dir.Y    *= 4;
            _dir.X    += ((float)Core.Overseer.Instance.rnd.NextDouble() * 1) - 0.5f;
            _dir.Y    += ((float)Core.Overseer.Instance.rnd.NextDouble() * 1) - 0.5f;
        }