Flèches droites peuvent changer d'angle #7

Merged
MaximilienBB merged 8 commits from origin/feature/StraightArrowChangesAngle into main 2025-05-30 23:42:35 +00:00
Owner

Ce Pull Request inclue aussi d'autres corrections mineures, comme le fait que le jeu utilise la nouvelle icône pour le château.

Ce Pull Request inclue aussi d'autres corrections mineures, comme le fait que le jeu utilise la nouvelle icône pour le château.
MaximilienBB added 5 commits 2025-05-30 20:24:17 +00:00
Created the foundations for the angle logic that the straight projectile will use when it fires from an angle.
Updated the function that changes the angle of the straigth projectile to work better the closer the enemy is to the shooter.

There is some more fixes to be done, as those close angles are too vertical.
- Fixed the conditional the projectile class uses to determine if a projectile should be angled or not;
- Fixed an issue where the graphic for the castle upgrade was missing.
Cleaned up the "Projectile.cs" file to remove personal comments and attempted solution to fixing the issue of units not being able to shoot arrows backward.
Ader_Alisma approved these changes 2025-05-30 22:28:25 +00:00
@ -68,3 +77,3 @@
float x = _speedTime;
float y = (_angle*-Mathf.Pow(x, 2) + _destinationX * x);
float y = (_angle*-Mathf.Pow(x, 2) + _destinationX * x)
Owner

Remettre le point-virgule

Remettre le point-virgule
MaximilienBB marked this conversation as resolved
@ -86,0 +111,4 @@
else if (angleX >= 0) lerpStepS = Mathf.Rad2Deg * Mathf.Atan(angleY / angleX);
else {
Owner

Peut-être ajouter des commentaires détaillant ce que font les IF, pour faciliter la maintenance plus tard. Que ce soit ce que les IF font, ou bien ce que les conditions signifient

Peut-être ajouter des commentaires détaillant ce que font les IF, pour faciliter la maintenance plus tard. Que ce soit ce que les IF font, ou bien ce que les conditions signifient
MaximilienBB marked this conversation as resolved
MaximilienBB added 1 commit 2025-05-30 22:31:35 +00:00
MaximilienBB added 1 commit 2025-05-30 23:31:17 +00:00
Des commentaires ont été ajoutés aux conditions qui détermines l'angle qui doit être appliqué aux flèches.
MaximilienBB added 1 commit 2025-05-30 23:42:25 +00:00
MaximilienBB merged commit 921449fc1d into main 2025-05-30 23:42:35 +00:00
MaximilienBB deleted branch origin/feature/StraightArrowChangesAngle 2025-05-30 23:42:35 +00:00
Sign in to join this conversation.
No Reviewers
No Label
No Milestone
No project
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Conjure/gather-and-defend#7
No description provided.