Simple Collision - XNA

lately very much interested in XNA, i wanted to write some of the issues

 private void SimpleCollision()
        {
            Rectangle rectangle1;
            Rectangle rectangle2;

            foreach (var blt in lstBullet)
            {

                rectangle1 = new Rectangle((int)blt.position.X, (int)blt.position.Y, blt.bull.Width, blt.bull.Height);

                foreach (var enm in lstEnemy)
                {
                    rectangle2 = new Rectangle((int)enm.enemyPosition.X,
                        (int)enm.enemyPosition.Y, enm.enemy.Width, enm.enemy.Height);

                    if (rectangle1.Intersects(rectangle2))
                    {
                        enm.status = false;
                        blt.status = false;
                    }
                }
            }
        }

continue >>

IE iFrame Cookies

IE need to know about :)  and W3C standard P3P Project took a lot of my time

answer;

protected void Page_Load(object sender, EventArgs e)       

{

  Page.Response.AddHeader("p3p",

      "CP=\"IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT\"");

}

continue >>

Blackberry, Screen Animation

I working on Blackberry SDK, I research did for myself wrote helper class animation small example;

static TransitionContext transitionContextIn;
static TransitionContext transitionContextOut;
static UiEngineInstance engine = Ui.getUiEngineInstance();

public static void Slide(Screen screen){

transitionContextIn = new TransitionContext(TransitionContext.TRANSITION_SLIDE);
transitionContextIn.setIntAttribute(TransitionContext.ATTR_DURATION, 1000);
transitionContextIn.setIntAttribute(TransitionContext.ATTR_DIRECTION, TransitionContext.DIRECTION_UP);

transitionContextOut = new TransitionContext(TransitionContext.TRANSITION_SLIDE);
transitionContextOut.setIntAttribute(TransitionContext.ATTR_DURATION, 1000);
transitionContextOut.setIntAttribute(TransitionContext.ATTR_DIRECTION, TransitionContext.DIRECTION_DOWN);
transitionContextOut.setIntAttribute(TransitionContext.ATTR_KIND, TransitionContext.KIND_OUT);

engine.setTransition(null, screen, UiEngineInstance.TRIGGER_PUSH, transitionContextIn);
engine.setTransition(screen, null, UiEngineInstance.TRIGGER_POP, transitionContextOut);

 

continue >>

How to set startup page for asp.net mvc aplication ?

Little ASP.NET MVC reminder :)

  • Project's Properties

  • Web tab

  • Select the Specific Page

continue >>

Windows Service Debug

Forgetting the need to write Windows Service Debugging

1.Install your service. For more information, see How to: Install and Uninstall Services.
2.Start your service, either from Services Control Manager, Server Explorer, or from code. For more information, see How to: Start Services.
3.In Visual Studio, choose Processes from the Debug menu.
  The Processes dialog box appears.
4.Click Show system processes.
5.In the Available Processes section, click the process for your service, and then click Attach.

  The Attach to Process dialog box appears.

ps: dll versions of the same should be

continue >>
Page 1 of 7   1 2 3 4 5   >>