예제 #1
0
파일: Level.cs 프로젝트: Uhha/MonoG
 public abstract void ManagerInput_FireNewInput(object sender, NewInputEventArgs e);
예제 #2
0
파일: Level2.cs 프로젝트: Uhha/MonoG
        //public void DrawAfterPlayer(SpriteBatch spritebatch)
        //{
        //    spritebatch.Draw(_wall, new Rectangle(0, 0, _width, _hight), Color.White);
        //    spritebatch.Draw(_handle, new Rectangle(0, 0, _width, _hight), Color.White);
        //    if (_player.GetComponent<Sprite>(ComponentType.Sprite).Position.Y < 532)
        //    {
        //        spritebatch.Draw(_booth, new Rectangle(0, 0, _width, _hight), Color.White);
        //    }
        //    if (_player.GetComponent<Sprite>(ComponentType.Sprite).Position.Y < 532)
        //    {
        //        //spritebatch.Draw(_lamp, new Rectangle(434, 276, (int)(_lamp.Width * 0.575), (int)(_lamp.Height * 0.549)), Color.White);
        //        spritebatch.Draw(_lamp, new Rectangle(0, 0, _width, _hight), Color.White);
        //    }
        //    if (_player.GetComponent<Sprite>(ComponentType.Sprite).Position.Y < 532)
        //    {
        //        //spritebatch.Draw(_wheely, new Rectangle(0, 0, _width, _hight), Color.White);
        //    }
        //}
        public override void ManagerInput_FireNewInput(object sender, NewInputEventArgs e)
        {
            Vector2 scaled = e.Point; // ManagerFunctions.ScaleTheMouse(e.Point);

            Vector2 endingPoint = scaled;
            _graph.Inside(endingPoint, out endingPoint);

            Vector2 startingPoint = _player.GetComponent<Sprite>(ComponentType.Sprite).Position;
            //_player.GetComponent<Sprite>(ComponentType.Sprite).Position = startingPoint;
            _graph.Inside(startingPoint, out startingPoint);

            LinkedList<Vector2> returnPath = _graph.calcShortPath(startingPoint, endingPoint);
            //LinkedList<Vector2> returnPath = _graph.calcShortPath(new Vector2(255.0498f,356.4527f), new Vector2(214,368));
            //LinkedList<Vector2> returnPath = _graph.calcShortPath(new Vector2(204.7022f, 445.0147f), new Vector2(232, 455));

            _player.GetComponent<Sprite>(ComponentType.Sprite).Path = returnPath;
        }
예제 #3
0
파일: Level1.cs 프로젝트: Uhha/MonoG
 public override void ManagerInput_FireNewInput(object sender, NewInputEventArgs e)
 {
     throw new NotImplementedException();
 }