Click here to Skip to main content
15,911,715 members
Home / Discussions / C#
   

C#

 
QuestionHow do I add VSTO as a prerequisite to my .NET setup? Pin
euroazn13-Jul-10 5:22
euroazn13-Jul-10 5:22 
Questiondll error Pin
Enobong Adahada13-Jul-10 1:27
Enobong Adahada13-Jul-10 1:27 
AnswerRe: dll error Pin
Richard MacCutchan13-Jul-10 1:34
mveRichard MacCutchan13-Jul-10 1:34 
GeneralRe: dll error Pin
Enobong Adahada13-Jul-10 1:41
Enobong Adahada13-Jul-10 1:41 
GeneralRe: dll error Pin
Pete O'Hanlon13-Jul-10 2:57
mvePete O'Hanlon13-Jul-10 2:57 
GeneralRe: dll error Pin
Enobong Adahada13-Jul-10 3:48
Enobong Adahada13-Jul-10 3:48 
AnswerRe: dll error Pin
Arun Jacob13-Jul-10 2:01
Arun Jacob13-Jul-10 2:01 
GeneralRe: dll error Pin
Enobong Adahada13-Jul-10 3:50
Enobong Adahada13-Jul-10 3:50 
QuestionDll which complied in vista takes too much time Pin
rsumanan13-Jul-10 1:09
rsumanan13-Jul-10 1:09 
AnswerRe: Dll which complied in vista takes too much time Pin
Not Active13-Jul-10 1:21
mentorNot Active13-Jul-10 1:21 
GeneralRe: Dll which complied in vista takes too much time Pin
rsumanan13-Jul-10 19:29
rsumanan13-Jul-10 19:29 
GeneralRe: Dll which complied in vista takes too much time Pin
Not Active14-Jul-10 1:05
mentorNot Active14-Jul-10 1:05 
GeneralRe: Dll which complied in vista takes too much time Pin
rsumanan14-Jul-10 17:19
rsumanan14-Jul-10 17:19 
QuestionThe classic bouncing ball logic!! Pin
Muammar©12-Jul-10 23:08
Muammar©12-Jul-10 23:08 
AnswerRe: The classic bouncing ball logic!! Pin
Eddy Vluggen12-Jul-10 23:13
professionalEddy Vluggen12-Jul-10 23:13 
GeneralRe: The classic bouncing ball logic!! Pin
Muammar©12-Jul-10 23:36
Muammar©12-Jul-10 23:36 
AnswerRe: The classic bouncing ball logic!! Pin
Peace ON12-Jul-10 23:51
Peace ON12-Jul-10 23:51 
GeneralRe: The classic bouncing ball logic!! Pin
Eddy Vluggen13-Jul-10 0:24
professionalEddy Vluggen13-Jul-10 0:24 
GeneralRe: The classic bouncing ball logic!! Pin
Muammar©13-Jul-10 0:42
Muammar©13-Jul-10 0:42 
GeneralRe: The classic bouncing ball logic!! Pin
Eddy Vluggen13-Jul-10 1:20
professionalEddy Vluggen13-Jul-10 1:20 
AnswerRe: The classic bouncing ball logic!! Pin
harold aptroot13-Jul-10 0:10
harold aptroot13-Jul-10 0:10 
You're doing it the hard way, why not just store a speed vector? (and don't create a struct/class for it, just store two ints or floats somewhere)
Speed can be negative, depending on the direction.
It will also make it much easier if you decide to do "other funny physics things", like gravity or other accelerations; you could just add the acceleration vector to the speed vector every update. (or scaled by time, if your steps are not fixed)

To bounce that way, you can do something like
none
until no change
{
    if (ball outside of horizontal range)
        mirror speed horizontally and mirror ball around the edge it hits
    if (ball outside of vertical range)
        mirror speed vertically and mirror ball around the edge it hits
}


Muammar© wrote:
y -= step+7;

That is a little odd.
AnswerRe: The classic bouncing ball logic!! [modified] Pin
Luc Pattyn13-Jul-10 1:04
sitebuilderLuc Pattyn13-Jul-10 1:04 
GeneralRe: The classic bouncing ball logic!! Pin
David Skelly13-Jul-10 2:06
David Skelly13-Jul-10 2:06 
GeneralRe: The classic bouncing ball logic!! Pin
Luc Pattyn13-Jul-10 2:18
sitebuilderLuc Pattyn13-Jul-10 2:18 
GeneralRe: The classic bouncing ball logic!! Pin
David Skelly13-Jul-10 6:51
David Skelly13-Jul-10 6:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.