Пример #1
0
 public void FireLoopCompleted(Vector2 pos)
 {
     Vector2 position = Camera.ConvertScreenToWorld(pos);
     HighlightPoint = GetHookPointFromPosition(position);
 }
Пример #2
0
        public void willHandleHookPointReset(HookPoint h)
        {
           
            //////////////////////////////////////
            //Has the point been marked to exit
            //////////////////////////////////////
            if (h._isExiting)
            {
                //////////////////////////
                //Add point to remove list
                //////////////////////////
                removeHookPoints.Add(h);
            }
            else
            {
                ///////////////////////////////////////////
                //Set new postion for scrolling hookpoints
                ///////////////////////////////////////////
                h.Translated = true;
                h._hookPointBody.SetTransform(new Vector2(GameConstants.BaseTranslate, h._hookPointBody.Position.Y), 0);
            }

        }
Пример #3
0
 public void AddHookPoint(HookPoint hookpoint)
 {
     HookPoints.Add(hookpoint);
 }
Пример #4
0
        private void AddHookPoint(HookPoint hookpoint)
        {
            HookPointBody b;
            if (StageManager.IsFirstStage())
            {
                /////////////////////////////////
                //Set points at start position
                //for first stage
                /////////////////////////////////
                b = new HookPointBody(World, hookpoint.StartingPositon, hookpoint._hookPointBodyType);
            }
            else
            {
                /////////////////////////////////
                //Set points at queue postion 
                /////////////////////////////////
                b = new HookPointBody(World, hookpoint.initialPosition, hookpoint._hookPointBodyType);
            }
            CircleShape CircleShape = new CircleShape(1f, 1f);
            //Vertices varray = new Vertices(10);
            //CircleShape CircleShape = new PolygonShape(varray, 1f);
            Fixture fixture = b.CreateFixture(CircleShape);
            fixture.Body.BodyType = BodyType.Kinematic;
            /////////////////////////////////////////
            //Check if our type should collide with
            //the swinger
            /////////////////////////////////////////
            if (b._hookPointBodyType != HookPointBodyType.Bullet)
            {
                //Ignor collison
                fixture.IgnoreCollisionWith(swinger);                
            }

            ///////////////////////////////////////
            //Set the created body of our hookpoint
            ///////////////////////////////////////
            hookpoint._hookPointBody = b;

            if (StageManager.IsFirstStage())
            {
                /////////////////////////////
                //first stage has no incoming
                //hookpoints, they are already
                //set
                /////////////////////////////
                hookpoint._isIncoming = false;
            }
            else
            {
                /////////////////////////////
                //set incoming to true
                /////////////////////////////
                hookpoint.SetIncoming();

            }

            ///////////////////////////////
            //Add hookpoints to our manager
            ///////////////////////////////
            hookpointmanager.AddHookPoint(hookpoint);
        }