Jump to content

variables and Cameras


Empfohlene Beiträge

Hello Trevor,

you are quite right. Even you can avoid the parantheses here.

But the aim of the example above was to explain how different variations of global and object variables may be used to buffer and later evaluate some object properties. See here the optimized example (without "buffer variables").

Using loco object variables directly.mbp

Many greetings
BahnLand

 

Bearbeitet von BahnLand
Link zu diesem Kommentar
Auf anderen Seiten teilen

On ‎24‎/‎09‎/‎2016 at 11:15 AM, BahnLand said:

Hello Trevor,

you are quite right. Even you can avoid the parantheses here.

But the aim of the example above was to explain how different variations of global and object variables may be used to buffer and later evaluate some object properties. See here the optimized example (without "buffer variables").

Using loco object variables directly.mbp

Many greetings
BahnLand

 

I agree. However, it is generally bad practice to use global variables if you do not have to. On a simple layout you might get away with it, but the more things you have happening the more opportunity there is for multiple objects to be referencing the same variable at the same time with unpredictable results.

Link zu diesem Kommentar
Auf anderen Seiten teilen

Erstelle ein Benutzerkonto oder melde dich an, um zu kommentieren

Du musst ein Benutzerkonto besitzen, um einen Kommentar verfassen zu können

Benutzerkonto erstellen

Neues Benutzerkonto für unsere Community erstellen.

Neues Benutzerkonto erstellen

Anmelden

Du hast bereits ein Benutzerkonto? Melde dich hier an.

Jetzt anmelden
×
×
  • Neu erstellen...