summaryrefslogtreecommitdiffstats
path: root/scene/main/timer.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Do not start `Timer` upon manual switching of internal processAndrii Doroshenko (Xrayez)2020-11-201-2/+2
| | | | | | | | | Prevents `Timer` to prematurely start and timeout immediately if internal processing is enabled manually with `Timer.set_process_internal(true)` or `Timer.set_physics_process_internal(true)`. Even if the internal processing is enabled manually, the user still has to actually start the timer with `start()` method explicitly.
* Reorganized core/ directory, it was too fatty alreadyreduz2020-11-071-1/+1
| | | | | | -Removed FuncRef, since Callable makes it obsolete -Removed int_types.h as its obsolete in c++11+ -Changed color names code
* Style: Enforce braces around if blocks and loopsRémi Verschelde2020-05-141-9/+16
| | | | | Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
* Style: Enforce separation line between function definitionsRémi Verschelde2020-05-141-0/+3
| | | | | | | | | | | | | | | | | | | | | | | I couldn't find a tool that enforces it, so I went the manual route: ``` find -name "thirdparty" -prune \ -o -name "*.cpp" -o -name "*.h" -o -name "*.m" -o -name "*.mm" \ -o -name "*.glsl" > files perl -0777 -pi -e 's/\n}\n([^#])/\n}\n\n\1/g' $(cat files) misc/scripts/fix_style.sh -c ``` This adds a newline after all `}` on the first column, unless they are followed by `#` (typically `#endif`). This leads to having lots of places with two lines between function/class definitions, but clang-format then fixes it as we enforce max one line of separation. This doesn't fix potential occurrences of function definitions which are indented (e.g. for a helper class defined in a .cpp), but it's better than nothing. Also can't be made to run easily on CI/hooks so we'll have to be careful with new code. Part of #33027.
* Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde2020-05-141-13/+0
| | | | | | | | | | | | | | Which means that reduz' beloved style which we all became used to will now be changed automatically to remove the first empty line. This makes us lean closer to 1TBS (the one true brace style) instead of hybridating it with some Allman-inspired spacing. There's still the case of braces around single-statement blocks that needs to be addressed (but clang-format can't help with that, but clang-tidy may if we agree about it). Part of #33027.
* Style: clang-format: Disable AllowShortCaseLabelsOnASingleLineRémi Verschelde2020-05-101-2/+6
| | | | Part of #33027.
* Rename more 2D and 3D nodes to follow conventionRémi Verschelde2020-03-271-0/+0
| | | | Rename editor plugins to match the new node names.
* Variant: Added 64-bit packed arrays, renamed Variant::REAL to FLOAT.Juan Linietsky2020-02-251-2/+2
| | | | | | | | | | | | | | | | | | | | | - 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.
* Update copyright statements to 2020Rémi Verschelde2020-01-011-2/+2
| | | | | | | | | | | 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.
* Improve the Timer wait time property hintHugo Locurcio2019-12-281-1/+1
| | | | | - Make it possible to enter more precise values (up to 3 decimals). - Make it possible to enter values above 4096.
* Added more details in Timer.start() error message.x2f2019-11-271-1/+1
|
* Added is_inside_tree() check in both Timer and Tweenshaderbeast2019-09-031-0/+3
| | | | Tween now throws error and doesnt even execute.
* Remove ERR_EXPLAIN from scene/* codeTomasz Chabora2019-08-091-2/+1
|
* Update copyright statements to 2019Rémi Verschelde2019-01-011-2/+2
| | | | Happy new year to the wonderful Godot community!
* Make core/ includes absolute, remove subfolders from include pathRémi Verschelde2018-09-121-1/+1
| | | | | | 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.
* Allows setting the Timer wait_time in start method.Anish2018-04-271-2/+5
| | | | | | | | Allows shortening the two line method of Timer.set_wait_time followed by Timer.start set wait_time as a parameter to Timer.start. Also modifies the class documentation. Fixes: #18107
* Bind many more properties to scriptsBojidar Marinov2018-01-121-0/+2
| | | | | | | 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
* Add missing copyright headers and fix formattingRémi Verschelde2018-01-051-0/+1
| | | | | | 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.
* Update copyright statements to 2018Rémi Verschelde2018-01-011-2/+2
| | | | Happy new year to the wonderful Godot community!
* Refactor Fixed to PhysicsPoommetee Ketson2017-10-211-1/+1
|
* Renamed fixed_process to physics_processAndreaCatania2017-09-301-10/+10
|
* Use HTTPS URL for Godot's website in the headersRémi Verschelde2017-08-271-1/+1
|
* Merge pull request #10351 from neikeq/enums-are-for-the-weakJuan Linietsky2017-08-211-2/+2
|\ | | | | ClassDB: Provide the enum name of integer constants
| * ClassDB: Provide the enum name of integer constantsIgnacio Etcheverry2017-08-201-2/+2
| |
* | Removes editor_hint from SceneTreeIgnacio Etcheverry2017-08-191-1/+3
|/
* Add "Godot Engine contributors" copyright lineRémi Verschelde2017-04-081-0/+1
|
* Fixer looping timer accumulation in _processRémi Verschelde2017-04-051-3/+2
| | | | Follow-up to #8251.
* previous value of time_left is added to wait_time before assigning to time_leftNikhil Shagrithaya2017-04-041-2/+1
|
* is_active to is_pausedAlexHolly2017-03-191-10/+16
| | | | rm doc
* A Whole New World (clang-format edition)Rémi Verschelde2017-03-051-46/+36
| | | | | | | | | | | | | | | | | | | | | | | | 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
* Rename the _MD macro to D_METHODHein-Pieter van Braam2017-02-131-13/+13
| | | | | | This new name also makes its purpose a little clearer This is a step towards fixing #56
* Remove use of _SCS from ADD_METHODHein-Pieter van Braam2017-02-131-4/+4
| | | | This saves typing and is a step towards fixing #56
* - _ready() callback only happens once now, if you want to receive it again, ↵Juan Linietsky2017-01-101-12/+12
| | | | | | | 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.
* ObjectTypeDB was renamed to ClassDB. Types are meant to be more generic to ↵Juan Linietsky2017-01-021-13/+13
| | | | | | | | Variant. All usages of "type" to refer to classes were renamed to "class" ClassDB has been exposed to GDScript. OBJ_TYPE() macro is now GDCLASS()
* Welcome in 2017, dear changelog reader!Rémi Verschelde2017-01-011-1/+1
| | | | | | | | That year should bring the long-awaited OpenGL ES 3.0 compatible renderer with state-of-the-art rendering techniques tuned to work as low as middle end handheld devices - without compromising with the possibilities given for higher end desktop games of course. Great times ahead for the Godot community and the gamers that will play our games!
* Now the timer could be pausedHearto Lazor2016-03-311-3/+23
| | | | | pause with: set_active(true/false) is paused with: is_active()
* remove trailing whitespaceHubert Jarosz2016-03-091-2/+2
|
* -make stream player and time restore state properly if removed, fixes #1949Juan Linietsky2016-02-021-0/+1
|
* Update copyright to 2016 in headersGeorge Marques2016-01-011-1/+1
|
* Update documentation for TileSet and TimerRémi Verschelde2015-09-251-1/+4
|
* - Implemented support for fixed process on timer. Useful for cooldowns ↵Hearto Lazor2015-05-101-9/+60
| | | | | | | | | | | | | | | without the influence from framerate similar to animation player (idle/fixed mode), where idle mode = old timer, fixed mode = fixed process implementation: Example of the behaviour with a stream of bullets with timers on different frame rates: https://gfycat.com/HeartyImpressiveIndiancow - A change for more uniform ticks on fixed/idle without this fix: http://i.imgur.com/0TMQ6CG.png with this fix: http://i.imgur.com/3zYx16c.png
* -fix timer behavior described, closes #1455Juan Linietsky2015-05-011-0/+2
|
* Updated copyright year in all headersJuan Linietsky2015-04-181-1/+1
|
* Batch of BugfixesJuan Linietsky2014-12-071-1/+2
| | | | | | | | | | | | | | | | | | | | | | -=-=-=-=-=-=-=-=- -Fixed Export UV XForm (should work now). #923 -Fixed enforcement of limits in property editor. #919 -Fixed long-standing bug of export editings in script inheritance. #914, #859, #756 -Fixed horrible error reporting in shader language. #912 -Added kinematic collision with plane (please test well). #911 -Fixed double animation track insert when using 2D rigs. #904 -VKey updates offset parameter in sprite edition. #901 -Do not allow anymore a script to preload itself. (does not fix #899, but narrows it down) -Avoid connection editor from overriding selected text. #897 -Fixed timer autostart. #876 -Fixed collision layers in 3D physics. #872 -Improved operators in shader #857 -Fixed ambient lighting bug #834 -Avoid editor from processing gamepad input #813 -Added not keyword #752 Please test!
* SceneMainLoop -> SceneTreeJuan Linietsky2014-11-051-1/+1
| | | | | | | | | | | | -=-=-=-=-=-=-=-=-=-=-=-=-=- *YOUR SOURCE MIGHT NOT WORK* For mor information on fix: https://github.com/okamstudio/godot/wiki/devel_scene_tree Other stuff: -Shower of bullets demo -Fixes all around
* ColladaJuan Linietsky2014-10-141-2/+3
| | | | | | | | | | | | -=-=-=- -Fixed some DAE import & export bugs -Changed Collada exporter to use the mesh loops API -Added tangent export to Collada exporter -Added triangulation option to Collada exporter -Changed a little how normalmaps are handled in shader. Not sure if it's working properly, be careful. -Fixed some strange bug with kinematic bodies #776 -Fix release compilaiton issues #782
* Little BitsJuan Linietsky2014-10-121-1/+4
| | | | | | | | | | | | | | | | | | | -=-=-=-=-=- -fix duplicate function bug when creating script callback in editor -fix bug where hiding lights does not work -fix 2D audio listener bug (romulox_x reported) -fix exported properties with inheritance bug -fix timer autostart (make it not work on editor) -reactivate first camara found if viewport runs out of active camera -option to hide gizmos in viewport -changed skeleton gizmo because it sucks -Make convex shapes using CollisionShape visible (use quickhull class) -fix up menu when editing a mesh, to export collision, navmesh, convex, etc. from it. -make a menu option to show SRGB in 3D editor views by default -make option to edit default light direction in viewport settings -make option to edit default ambient light in viewport settings -make software conversion of linear->RGB if hardware support not found
* GODOT IS OPEN SOURCEJuan Linietsky2014-02-091-0/+140