Autor Beitrag
[Red]Bull
Hält's aus hier
Beiträge: 3



BeitragVerfasst: Do 08.02.07 21:26 
Also .. ich hab n Problem ... wir haben ein Programm erstellt, in dem wir Kugeln per "Random" über einen Tisch rollen Lassen... bisher ist sind die Kugeln von i:Integer abhängig... und wir sollen das von der aktuellen Position des Cursors abhängig machen .. wie geht das ??

--- >

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
program pBilliard;

uses
  mSuM, mKugel, mTisch;

var meinBildschirm:Bildschirm;
    dieKugeln:array[1..13]of Kugel;
    meineMaus:Maus;
    meinTisch:Tisch;
    i:integer;

begin
 meinBildschirm:=Bildschirm.init;
 meineMaus:=Maus.init;
 meinTisch:=Tisch.init(10,10);

 randomize;
 for i:=1 to 13 do
  begin
  //randomize;
  dieKugeln[i]:=Kugel.init(100+(i+3),100+3*i*i,i);
  dieKugeln[i].lerneTischKennen(meinTisch);
  dieKugeln[i].setzeRichtung(random(360)*i);
  dieKugeln[i].setzeGroesse(i*3);
  dieKugeln[i].setzeGeschwindigkeit(random(15)+2);
  end;


Moderiert von user profile iconChristian S.: Delphi-Tags hinzugefügt


Zuletzt bearbeitet von [Red]Bull am Do 08.02.07 21:32, insgesamt 1-mal bearbeitet
Marco D.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2750

Windows Vista
Delphi 7, Delphi 2005 PE, PHP 4 + 5 (Notepad++), Java (Eclipse), XML, XML Schema, ABAP, ABAP OO
BeitragVerfasst: Do 08.02.07 21:33 
Die Cursorposition bekommst du mit Mouse.CursorPos.

_________________
Pascal keeps your hand tied. C gives you enough rope to hang yourself. C++ gives you enough rope to shoot yourself in the foot
[Red]Bull Threadstarter
Hält's aus hier
Beiträge: 3



BeitragVerfasst: Do 08.02.07 21:35 
Ja das is schonma n guter tipp .. danke

Aber die Kugeln müssen untereinander und ich weiß nich wie ich das programmieren soll
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: Do 08.02.07 21:35 
Wenn man schon Quelltext sendet, sollte man immer noch bedenken, ob der gesendete Quelltext auch für den, der einem helfen soll, nützlich und hilfreich zum Verständnis deines Problems ist ... Ach ja: Wo wir gerade dabei sind: Dein Problem solltest Du auch deutlich und in gutem Deutsh formulieren.

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.
Marco D.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2750

Windows Vista
Delphi 7, Delphi 2005 PE, PHP 4 + 5 (Notepad++), Java (Eclipse), XML, XML Schema, ABAP, ABAP OO
BeitragVerfasst: Do 08.02.07 21:37 
Lade doch am besten das GESAMTE Projekt hoch. ;)

_________________
Pascal keeps your hand tied. C gives you enough rope to hang yourself. C++ gives you enough rope to shoot yourself in the foot
[Red]Bull Threadstarter
Hält's aus hier
Beiträge: 3



BeitragVerfasst: Do 08.02.07 21:39 
Ok here it is ...
Einloggen, um Attachments anzusehen!