示例#1
0
        /// <summary>
        /// Create a moving saw object that is passed into the gameworld.
        /// </summary>
        internal MapObject CreateMovingSaw(Vector2 pos, int min, int max, bool sideways)
        {
            List <Vector2> sawBoundingBox = new List <Vector2>
            {
                pos,
                new Vector2(pos.X + 50, pos.Y),
                new Vector2(pos.X + 50, pos.Y + 50),
                new Vector2(pos.X, pos.Y + 50)
            };

            var obj = new MapObject(TextureType.MovingSaw, new Body(new Polygon(sawBoundingBox)))
            {
                _HitEvent = true
            };
            MovingSaw saw = new MovingSaw(obj, min, max, sideways);

            DungeonEscape._GameController.AddMapSaw(saw);

            return(obj);
        }
示例#2
0
 internal void AddMapSaw(MovingSaw saw)
 {
     _Saws.Add(saw);
 }