Commit graph

84 commits

Author SHA1 Message Date
Thakee Nathees
2811268231 Fix: Tween always return true for _get(), _set() 2020-05-05 16:32:33 +05:30
lupoDharkael
95a1400a2a Replace NULL with nullptr 2020-04-02 13:38:00 +02:00
Yuri Roubinsky
d5bff588c7 Removed boolean return type from majority of method in Tween 2020-03-06 10:59:07 +03:00
Juan Linietsky
33b5c57199 Variant: Added 64-bit packed arrays, renamed Variant::REAL to FLOAT.
- Renames PackedIntArray to PackedInt32Array.
- Renames PackedFloatArray to PackedFloat32Array.
- Adds PackedInt64Array and PackedFloat64Array.
- Renames Variant::REAL to Variant::FLOAT for consistency.

Packed arrays are for storing large amount of data and creating stuff like
meshes, buffers. textures, etc. Forcing them to be 64 is a huge waste of
memory. That said, many users requested the ability to have 64 bits packed
arrays for their games, so this is just an optional added type.

For Variant, the float datatype is always 64 bits, and exposed as `float`.

We still have `real_t` which is the datatype that can change from 32 to 64
bits depending on a compile flag (not entirely working right now, but that's
the idea). It affects math related datatypes and code only.

Neither Variant nor PackedArray make use of real_t, which is only intended
for math precision, so the term is removed from there to keep only float.
2020-02-25 12:55:53 +01:00
Rémi Verschelde
c9e1d98c62
Merge pull request #36411 from Janglee123/rect2-tween
Added tween support for Rect2
2020-02-23 08:46:48 +01:00
janglee
4bbe87abb7 Added tween support for Rect2
Fixes #34575
2020-02-23 07:21:04 +05:30
Juan Linietsky
69c95f4b4c Reworked signal connection system, added support for Callable and Signal objects and made them default. 2020-02-20 08:24:50 +01:00
Juan Linietsky
867d073b98 Changed logic and optimized ObjectID in ObjectDB and Variant, removed RefPtr. 2020-02-15 08:36:04 -03:00
PouleyKetchoupp
6c04c824bd Fixed Tween::start() with pending updates
Start was canceled instead of deferred in case of an update in progress.
Fixes #35441
2020-01-22 22:27:37 +01:00
Rémi Verschelde
a7f49ac9a1 Update copyright statements to 2020
Happy new year to the wonderful Godot community!

We're starting a new decade with a well-established, non-profit, free
and open source game engine, and tons of further improvements in the
pipeline from hundreds of contributors.

Godot will keep getting better, and we're looking forward to all the
games that the community will keep developing and releasing with it.
2020-01-01 11:16:22 +01:00
Andrii Doroshenko (Xrayez)
81db0e9274 Provide default Tween values for transition and easing types
TRANS_LINEAR and EASE_IN_OUT are chosen as defaults for
interpolation and follow methods.
2019-12-12 02:15:15 +02:00
Rafał Mikrut
99d8626f4a Fix some overflows and unitialized variables 2019-11-20 16:22:16 +01:00
Mark Riedesel
d0b528e4a8 Fix Tween follow_property finishing with null 2019-10-23 16:38:43 -04:00
luz.paz
91ecd7b6a6 Fix misc. source comment typos
Found using `codespell -q 3 -S ./thirdparty,*.po -L ang,ba,cas,dof,doubleclick,fave,hist,leapyear,lod,nd,numer,ois,paket,seeked,sinc,switchs,te,uint -D ~/Projects/codespell/codespell_lib/data/dictionary.txt `
2019-09-19 14:36:52 -04:00
shaderbeast
5e337b31eb Added is_inside_tree() check in both Timer and Tween
Tween now throws error and doesnt even execute.
2019-09-03 13:26:41 +02:00
Tomasz Chabora
af5e0fff66 Remove ERR_EXPLAIN from scene/* code 2019-08-09 13:54:52 +02:00
qarmin
4e5310cc60 Some code changed with Clang-Tidy 2019-06-26 15:08:25 +02:00
Devin Pentecost
265eaf1a2c Implementing 0-duration tweens
Some light refactor
Adding comments in functions
2019-06-14 07:20:13 -07:00
Chaosus
a19e99aacb Added signal for Tween emitted at completion 2019-04-03 10:35:26 +03:00
Rémi Verschelde
b16c309f82 Update copyright statements to 2019
Happy new year to the wonderful Godot community!
2019-01-01 12:58:10 +01:00
Rémi Verschelde
7b081a7fc8 Fix warnings about unhandled enum value in switch [-Wswitch]
Fixes GCC 5 warnings of the form:

core/io/http_client.cpp:288:9: warning: enumeration value 'STATUS_SSL_HANDSHAKE_ERROR' not handled in switch [-Wswitch]
core/io/marshalls.cpp:806:9: warning: enumeration value 'AABB' not handled in switch [-Wswitch]

Those can be trivial cases where adding a default fallback is the solution,
or more complex issues/hidden bugs where missed values are actually meant
to be handled.
2018-09-27 18:34:30 +02:00
Rémi Verschelde
74d80146ff
Merge pull request #21913 from DualMatrix/tween_remove_all
Fixed calling start() after remove_all() on tween not working
2018-09-12 11:01:19 +02:00
Rémi Verschelde
277b24dfb7 Make core/ includes absolute, remove subfolders from include path
This allows more consistency in the manner we include core headers,
where previously there would be a mix of absolute, relative and
include path-dependent includes.
2018-09-12 09:52:22 +02:00
DualMatrix
359198f137 Fixed calling start() emmediately after remove_all() on tween not wroking
Fixed calling start() emmediately after remove_all() on tween not wroking

Fixes #19901
2018-09-11 13:54:35 +02:00
James
4c2f9c19b8 Tween: Add a unique identifier to InterpolateData to be able to remove the right one when finished 2018-08-16 15:59:35 +02:00
James
796088a911 interpolation was not removed because of id mismatch 2018-08-09 14:48:56 +02:00
Răzvan C. Rădulescu
07874292d0 Check "done" state in original loop
My first attepmt I added a second loop to check if processing should
stop. This attempts to optimize by using the original loop (one loop).

Also resets `elapsed` time on finish of tween which fixes `tell()`.
2018-06-27 10:17:00 +02:00
Răzvan C. Rădulescu
5c914e2d5b Fix and make Tween node less confusing
I've made the following changes:
- make `is_active` the main way of keeping track of tween
  processing/activity, meaning that `is_active` will now return
  `false` if all tween actions have finished or if it isn't started
  or if it was stopped via `set_active(false)` or any other mode
- removed is_stopped because is redundand now

The above meant that we don't have to keep track of yet another variable
`available` since everything is based on `*processing_internal` so I
removed it, likewise it's own local `processing` variable was removed,
as well as the "double" `_set_process` which it feels more like a hack.

What wasn't changed:
- `tell()` still returns max value (i.e. `== get_runtime()` when all
  tweens `finish`)

*More testing is needed*. So far I've tested repeat on/off, delay,
`is_active()` working corretly, `set_active(true), set_active(false)`,
but probably more tests are necessary, all the resets, stops, resume
etc.
2018-06-26 18:16:57 +02:00
steincodes
d3483d8c1e Adding is_stopped method to Tween 2018-06-07 17:14:31 +05:30
Rasmus Ketelsen
c518b96362 Take tween speed into account when calculating runtime 2018-05-25 15:05:45 +02:00
Paul Joannon
e30aa1386c
update signals' MethodInfo in Tween
key is a NodePath, not a String
2018-01-23 13:06:03 +01:00
Bojidar Marinov
9b8e8b2220
Bind many more properties to scripts
Notable potentially breaking changes:
- PROPERTY_USAGE_NOEDITOR is now PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_NETWORK, without PROPERTY_USAGE_INTERNAL
- Some properties were renamed, and sometimes even shadowed by new ones
- New getter methods (some virtual) were added
2018-01-12 00:58:14 +02:00
Rémi Verschelde
e4213e66b2 Add missing copyright headers and fix formatting
Using `misc/scripts/fix_headers.py` on all Godot files.
Some missing header guards were added, and the header inclusion order
was fixed in the Bullet module.
2018-01-05 01:22:23 +01:00
Rémi Verschelde
b23f7bc923
Merge pull request #15161 from volzhs/tween-follow
Fix Tween follow not working
2018-01-03 11:45:19 +01:00
Rémi Verschelde
b50a9114b1 Update copyright statements to 2018
Happy new year to the wonderful Godot community!
2018-01-01 14:40:47 +01:00
volzhs
c3f59f290c Fix Tween follow not working
Fix regression from 7609efe757
2017-12-29 21:59:45 +09:00
Rémi Verschelde
613d374bc5
Merge pull request #12284 from bojidar-bg/allow-subproperty-set
Allow for getting/setting "dotted" properties of objects
2017-11-21 22:44:14 +01:00
Bojidar Marinov
0cf9597758
Allow for getting/setting indexed properties of objects using get/set_indexed
Performance is around the same as using pure set() through GDScript.
2017-11-21 20:58:21 +02:00
Ferenc Arn
d28763a4c1 Rename Rect3 to AABB.
Fixes #12973.
2017-11-17 11:01:41 -05:00
Bojidar Marinov
7bbde636e8 Make Tween::interpolate_property's able to get() the initial value
To use this behavior, pass `null` in place of the initial_value parameter.
2017-11-13 11:23:46 +02:00
Poommetee Ketson
9b634180aa Refactor Fixed to Physics 2017-10-21 21:28:08 +07:00
AndreaCatania
4537977d6d Renamed fixed_process to physics_process 2017-09-30 16:19:07 +02:00
cryptonaut
023b68542f Cleaned up logic in Tween::_tween_process(), fixes #9187 2017-08-29 00:08:59 -07:00
Rémi Verschelde
bd282ff43f Use HTTPS URL for Godot's website in the headers 2017-08-27 14:16:55 +02:00
Ignacio Etcheverry
32dd9a9f66 ClassDB: Provide the enum name of integer constants 2017-08-20 22:07:43 +02:00
Indah Sylvia
5ae78fdf6a Makes all Godot API's methods Lower Case 2017-08-07 18:24:35 +07:00
Poommetee Ketson
e3998528e0 BuildSystem: generated files have .gen.extension 2017-06-25 07:55:01 +07:00
alexholly
935f730170 renamed all Rect3.pos to Rect3.position 2017-06-09 15:54:02 +02:00
Rémi Verschelde
df61dc4b2b Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
Shin-NiL
d8c396a44f Honor the Tween's final values 2017-03-30 07:58:20 -03:00