-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathUnit6.pas
108 lines (95 loc) · 3.12 KB
/
Unit6.pas
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
/// <summary>
/// ***************************************************************************
///
/// Delphi FMX Game Snippets
///
/// Copyright 2021-2024 Patrick Prémartin under AGPL 3.0 license.
///
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
/// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
/// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
/// DEALINGS IN THE SOFTWARE.
///
/// ***************************************************************************
///
/// Examples of what is done when developing video games: sprite management,
/// background music, sound effects, animations, ...
///
/// Projects are developed under Delphi with its FireMonkey multiplatform
/// framework to run our projects under Windows, macOS, iOS, Android and Linux
/// from the same code base.
///
/// Not all images and musics used in this repository are free of charge.
/// Reuse them only if you have a license. They remain the property of their
/// respective authors and are only present in the programs for demo purposes.
///
/// ***************************************************************************
///
/// Author(s) :
/// Patrick PREMARTIN
///
/// Site :
/// https://fmxgamesnippets.developpeur-pascal.fr
///
/// Project site :
/// https://github.com/DeveloppeurPascal/Delphi-FMX-Game-Snippets
///
/// ***************************************************************************
/// File last update : 07/07/2024 08:50:40
/// Signature : 676b0b82f566c12551386ad9b43dba0b5bd2768d
/// ***************************************************************************
/// </summary>
unit Unit6;
interface
uses
System.SysUtils, System.Types, System.UITypes, System.Classes,
System.Variants,
FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.Objects,
FMX.Ani;
type
TForm6 = class(TForm)
Vagues01: TRectangle;
Vagues01Anim: TFloatAnimation;
Vagues02: TRectangle;
Vagues02Anim: TFloatAnimation;
Vagues03: TRectangle;
Vagues03Anim: TFloatAnimation;
procedure FormCreate(Sender: TObject);
procedure FormResize(Sender: TObject);
private
{ Déclarations privées }
procedure InitVagues;
public
{ Déclarations publiques }
end;
var
Form6: TForm6;
implementation
{$R *.fmx}
procedure TForm6.FormCreate(Sender: TObject);
begin
InitVagues;
Vagues01Anim.Enabled := true;
Vagues02Anim.Enabled := true;
Vagues03Anim.Enabled := true;
end;
procedure TForm6.FormResize(Sender: TObject);
begin
InitVagues;
end;
procedure TForm6.InitVagues;
begin
Vagues01.Position.y := height - Vagues01.height;
Vagues01.Width := Width + 132;
Vagues01.Position.x := 0;
Vagues02.Position.y := height - Vagues01.height+20;
Vagues02.Width := Width + 132;
Vagues02.Position.x := 0;
Vagues03.Position.y := height - Vagues01.height+40;
Vagues03.Width := Width + 132;
Vagues03.Position.x := 0;
end;
end.