the images was not the one that i wanted,
but i have done it without using them
==========
sorry for being late,
here's a new test:
[removed]
[see the edit part]==============
Changes:
1. Changed: type and position of objects needed for liquid movement
2. Sorted: objects in widget tree for being back/front of each other
3. Changed: name of some images for easier scripting
4. Changed: the code for liquid movement
5. Changed: speed of filling/emptying liquid to 5
6. Added: the code to load all the images for different colors through code (so it only using one object for all colors)
7. removed: extra objects from the widget
================
Note:
1. i have changed position of most of the objects, plz re-position them if needed
2. i have set most of the objects to lock position to don't change position during designing, disable it if necessary
3. if you need to change the name of images and objects, then maybe the code needs to be changed
=================
to do:
1. you have to add a background to the bottom of the glass
> to hide the top of the liquid when glass gets empty
2. you have to re-size & re-position the objects if needed
=======================
question:
what does the [glass] layer do? (why [image2] is inside [glass] layer?)
==============
Edit:Changes:
1. Added: renamed images to designer for easier editing (in previous version, i have forgotten to add them to the designer after renaming them)
2. Changed: Visibility of images that i have recently added to designer
3. Changed: a bit position and size of objects
Edit2:Attachment:
Changes:
1. fixed: the top of liquid goes a bit higher than it should be, in previous version
2. Added: the code to start filling from bottom of glass only if the color has changed (it doesn't empty the glass if the color has not changed)
Quote:
2. Added: the code to start filling from bottom of glass only if the color has changed (it doesn't empty the glass if the color has not changed)
question:
which way is better?
1. always fill from 0
2. only fill from 0 if color has changed