- This wiki is out of date, use the continuation of this wiki instead
Angle
From FenixWiki
(Difference between revisions)
Revision as of 10:20, 25 March 2007 (edit) Yonni (Talk | contribs) ← Previous diff |
Revision as of 23:23, 25 March 2007 (edit) (undo) Sandman (Talk | contribs) m Next diff → |
||
Line 1: | Line 1: | ||
- | |||
== Definition == | == Definition == | ||
- | Angle is a predefined [[local variable]] which holds the angle (measured in 1/1000 of a degree) which the [[graphic]] of that process (assigned by the [[graph]] variable) will be drawn | + | Angle is a predefined [[local]] [[variable]] which holds the angle (measured in 1/1000 of a degree) at which the [[graphic]] of that [[process]] (assigned by the [[graph]] [[variable]]) will be drawn. |
== Example == | == Example == | ||
- | To make the [[graphic]] of a process spin: | + | To make the [[graphic]] of a [[process]] spin: |
<pre> | <pre> | ||
- | + | Process spinning_graphic() | |
- | + | Begin | |
graph = load_png("image.png"); //load the graphic and assign it to the graph variable | graph = load_png("image.png"); //load the graphic and assign it to the graph variable | ||
x = 100; //Position the graphic 100 pixels | x = 100; //Position the graphic 100 pixels | ||
y = 100; //from the top and left of the screen | y = 100; //from the top and left of the screen | ||
- | | + | Loop |
angle += 1000; //increase the angle of graphic by 1000 each frame. 1000 = 1 degree. | angle += 1000; //increase the angle of graphic by 1000 each frame. 1000 = 1 degree. | ||
frame; | frame; | ||
- | | + | End |
- | + | End | |
</pre> | </pre> | ||
This process will spin the [[graphic]] stored in the file "image.png" by 1 degree each frame. | This process will spin the [[graphic]] stored in the file "image.png" by 1 degree each frame. |
Revision as of 23:23, 25 March 2007
Definition
Angle is a predefined local variable which holds the angle (measured in 1/1000 of a degree) at which the graphic of that process (assigned by the graph variable) will be drawn.
Example
To make the graphic of a process spin:
Process spinning_graphic() Begin graph = load_png("image.png"); //load the graphic and assign it to the graph variable x = 100; //Position the graphic 100 pixels y = 100; //from the top and left of the screen Loop angle += 1000; //increase the angle of graphic by 1000 each frame. 1000 = 1 degree. frame; End End
This process will spin the graphic stored in the file "image.png" by 1 degree each frame.