78 lines
2.8 KiB
HTML
78 lines
2.8 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
|
|
<html>
|
|
<head>
|
|
<title>Deflectors</title>
|
|
<link href="style.css" rel="stylesheet" type="text/css">
|
|
</head>
|
|
<body background="images/back.gif">
|
|
<!--START-->
|
|
|
|
<h3>Deflectors</h3>
|
|
|
|
Deflectors deflect particles when they appear in their region. Note that only the position
|
|
of the particle is taken into account not its sprite or size.
|
|
A particle system can have an arbitrary number of deflectors.
|
|
A deflector has the following properties:
|
|
|
|
<ul>
|
|
<li><tt><b>xmin, xmax, ymin, ymax</b></tt>
|
|
indicates the extent of the region in which the particles are deflected.</li>
|
|
<li><tt><b>kind</b></tt>
|
|
indicates the kind of deflector. It can have the following values:</li>
|
|
<ul>
|
|
<li><tt>ps_deflect_horizontal</tt>
|
|
deflects the particle horizontally; typically used for vertical walls</li>
|
|
<li><tt>ps_deflect_vertical</tt>
|
|
deflects the particle vertically; typically used for horizontal walls</li>
|
|
</ul>
|
|
<li><tt><b>friction</b></tt>
|
|
the amount of friction as a result of the impact with the deflector.
|
|
The higher this amount the more the particle is slowed down on impact.</li>
|
|
</ul>
|
|
|
|
<p>
|
|
The following functions are available to set the properties of the deflector.
|
|
Note that each of them gets the index of the particle system to which it belongs
|
|
as a first argument.
|
|
|
|
<p>
|
|
<blockquote>
|
|
<tt><b>part_deflector_create(ps)</b></tt>
|
|
Creates a new deflector in the given particle system. It returns the index of the deflector.
|
|
This index must be used in all calls below to set the properties of the deflector.<br>
|
|
<tt><b>part_deflector_destroy(ps,ind)</b></tt>
|
|
Destroys deflector ind in the particle system.
|
|
Call this if you don't need it anymore to save space.<br>
|
|
<tt><b>part_deflector_destroy_all(ps)</b></tt>
|
|
Destroys all deflectors in the particle system that have been created.<br>
|
|
<tt><b>part_deflector_exists(ps,ind)</b></tt>
|
|
Returns whether the indicated deflector exists in the particle system.<br>
|
|
<tt><b>part_deflector_clear(ps,ind)</b></tt>
|
|
Clears the deflector ind to its default settings.<br>
|
|
<tt><b>part_deflector_region(ps,ind,xmin,xmax,ymin,ymax)</b></tt>
|
|
Sets the region for the deflector.<br>
|
|
<tt><b>part_deflector_kind(ps,ind,kind)</b></tt>
|
|
Sets the kind for the deflector.<br>
|
|
<tt><b>part_deflector_friction(ps,ind,friction)</b></tt>
|
|
Sets the friction for the deflector.
|
|
</blockquote>
|
|
|
|
|
|
<!--END-->
|
|
</body>
|
|
</html>
|
|
|
|
<!-- KEYWORDS
|
|
part_deflector_create()
|
|
part_deflector_destroy()
|
|
part_deflector_destroy_all()
|
|
part_deflector_exists()
|
|
part_deflector_clear()
|
|
part_deflector_region()
|
|
part_deflector_kind()
|
|
part_deflector_friction()
|
|
ps_deflect_vertical
|
|
ps_deflect_horizontal
|
|
|
|
--> |