Commit graph

74 commits

Author SHA1 Message Date
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
Rémi Verschelde 5dbf1809c6 A Whole New World (clang-format edition)
I can show you the code
Pretty, with proper whitespace
Tell me, coder, now when did
You last write readable code?

I can open your eyes
Make you see your bad indent
Force you to respect the style
The core devs agreed upon

A whole new world
A new fantastic code format
A de facto standard
With some sugar
Enforced with clang-format

A whole new world
A dazzling style we all dreamed of
And when we read it through
It's crystal clear
That now we're in a whole new world of code
2017-03-05 16:44:50 +01:00
Hein-Pieter van Braam 411ee71b4d Rename the _MD macro to D_METHOD
This new name also makes its purpose a little clearer

This is a step towards fixing #56
2017-02-13 12:50:02 +01:00
Hein-Pieter van Braam 0f687f0ccb Remove use of _SCS from ADD_METHOD
This saves typing and is a step towards fixing #56
2017-02-13 10:37:47 +01:00
sanikoyes 9123e91634 Fix tween Transform2D typo 2017-02-07 15:45:49 +08:00
Juan Linietsky 00ec16e3f3 renamed tween animationplayer scale functions to speed_scale 2017-01-13 19:36:04 -03:00
Rémi Verschelde f392b340ff Tween: Rename times_in_sec (sic) param to duration 2017-01-13 19:40:18 +01:00
Juan Linietsky 83cb84753f Renamed most signals so they refer to:
-An action being requested to the user in present tense: (ie, draw, gui_input, etc)
-A notification that an action happened, in past tense (ie, area_entered, modal_closed, etc).
2017-01-12 00:51:08 -03:00
Juan Linietsky bc26f90581 Type renames:
Matrix32 -> Transform2D
	Matrix3 -> Basis
	AABB -> Rect3
	RawArray -> PoolByteArray
	IntArray -> PoolIntArray
	FloatArray -> PoolFloatArray
	Vector2Array -> PoolVector2Array
	Vector3Array -> PoolVector3Array
	ColorArray -> PoolColorArray
2017-01-11 00:52:51 -03:00
Juan Linietsky f3f4a11cfb - _ready() callback only happens once now, if you want to receive it again, use request_ready()
- C++ Nodes mostly do an internal process callback, so it does not conflict with users willing to use their own process callbacks
- callbacks such as _input, _process, _fixed_process _unhandled_input, _unhandled_key_input do not requiere calling a function to enable them. They are enabled automatically if found on the script.
2017-01-10 18:04:33 -03:00
Juan Linietsky b085c40edf -Conversion of most properties to a simpler syntax, easier to use by script
-Modified help to display properties

GDScript can still not make use of them, though.
2017-01-04 01:16:14 -03:00