Register for your free account! | Forgot your password?

You last visited: Today at 10:41

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[Release] Animation-Timer / LoopTimer

Discussion on [Release] Animation-Timer / LoopTimer within the Metin2 PServer Guides & Strategies forum part of the Metin2 Private Server category.

Reply
 
Old   #1

 
elite*gold: 83
Join Date: Nov 2013
Posts: 2,891
Received Thanks: 2,764
[Release] Animation-Timer / LoopTimer

Heute Release ich einen Animation-Timer und einen LoopTimer (der, der auch gestern schon im Release mit drin war).

Mit dem Animation-Timer kann man ganz einfach lineare Animationen ausführen.

Hier ein Screen einer meiner Tests:



Bedienung:
  • animationFunc (function): Eine Funktion die während der Animation mehrmals mit den neuen Position aufgerufen wird
  • duration (float): Dauer der Animation in Sekunden
  • startValues (list / tuple mit numerischen Werten): Startwerte für die Animation. Anzahl der Werte muss den Übergabeparametern der Funktion entsprechen
  • endValues (list / tuple mit numerischen Werten): Endwerte für die Animation. Anzahl der Einträge muss die selbe wie bei startValues sein
Die Animation kann beliebig oft angehalten (animation.Stop()) und wieder gestartet (animation.Start()) werden. Sobald die Animation einmal beendet wurde, bringt ein Aufruf von animation.Start() nichts mehr.


Download:


Special Thanks:
  • Yiv - für den Beistand beim Einrichten meines m2_releases Ordners ...
rollback is offline  
Thanks
18 Users
Old 02/08/2016, 01:31   #2
 
Yiv's Avatar
 
elite*gold: 47
Join Date: Feb 2012
Posts: 2,282
Received Thanks: 2,579
Falls sich jemand fragt, wofür das gut sein soll:
Man könnte damit bspw. sehr leicht eine Sidebar animieren, also das ein- und ausklappen oder irgendwelche anderen GUI-Elemente. Natürlich kann man das ganze auch anderweitig nutzen :P

Hast du gut gemacht, mein Padawan

MfG
Yiv is offline  
Old 02/08/2016, 02:24   #3
 
elite*gold: 0
Join Date: Aug 2009
Posts: 1,422
Received Thanks: 1,368
schick schick

für den Fall das die Seiten irgendwann weg sind beide Files zum download
Attached Files
File Type: rar LoopTimer.rar (1.1 KB, 42 views)
blackout85 is offline  
Old 02/08/2016, 09:50   #4

 
elite*gold: 192
Join Date: Aug 2009
Posts: 5,797
Received Thanks: 3,141
Felix aka der König der RLS mit den wenige Leute was anfangen können
[-Lee-] is offline  
Thanks
2 Users
Old 02/09/2016, 22:51   #5
 
elite*gold: 0
Join Date: Jan 2014
Posts: 268
Received Thanks: 373
Doch ist schön brauch ich nicht mehr mein komisches self.startTime usw... Hab mir sowas für Window-Class für Alpha gemacht das auch cool ^_^
Lefloyd is offline  
Thanks
1 User
Old 02/10/2016, 09:15   #6

 
elite*gold: 83
Join Date: Nov 2013
Posts: 2,891
Received Thanks: 2,764
Quote:
Originally Posted by Lefloyd View Post
Doch ist schön brauch ich nicht mehr mein komisches self.startTime usw... Hab mir sowas für Window-Class für Alpha gemacht das auch cool ^_^
Danke für dein Feedback!

Kannst das hier ja auch für Alpha nutzen:
Code:
from animation import Animation

animation = Animation(lambda alpha: self.__myGuiElement.SetAlpha(alpha), 0.5, [0.0], [1.0])
animation.Start()
(Alpha von 0.0 auf 1.0 innerhalb von 1/2 Sekunde)

Wie Yiv bereits gesagt hat, kann man für alles mögliche nutzen
rollback is offline  
Old 02/13/2016, 13:32   #7

 
elite*gold: 83
Join Date: Nov 2013
Posts: 2,891
Received Thanks: 2,764
Es ist jetzt noch ein neuer AnimationTimer verfügbar. Dieser läuft nun ohne den LoopTimer und sollte (zumindest theoretisch) die angegebene Funktion öfter und zuverlässiger aufrufen.

Änderungen für in der Anwendung:
Die Stop() Methode beendet nun den Thread, zum pausieren jetzt die Pause() Methode nutzen.


EDIT:
Der neue AnimationTimer benötigt nun den neuen LoopTimer (v2).
rollback is offline  
Old 02/21/2016, 01:32   #8

 
elite*gold: 83
Join Date: Nov 2013
Posts: 2,891
Received Thanks: 2,764
Hier mal ein kleines Beispiel was man damit so machen kann (mit wenig Aufwand ... wie man in der Datei im Hintergrund sieht):

rollback is offline  
Reply


Similar Threads Similar Threads
[Release] BonusAdder / LoopTimer (in eigenem Thread)
02/06/2016 - Metin2 PServer Guides & Strategies - 0 Replies
constinfo.py: BONUS_ADD_VNUMS = { # vnum: bonusRange 71085: } MAX_BONUS_COUNT = 0 for vnum, bonusRange in BONUS_ADD_VNUMS.iteritems(): if (bonusRange + 1) > MAX_BONUS_COUNT: MAX_BONUS_COUNT = bonusRange + 1
[Release] Jungle Timer
06/18/2014 - League of Legends Hacks, Bots, Cheats & Exploits - 131 Replies
8.12: Stable and working! Need more suggestions for a new update! Hey guys, I've been thinking about my first program could be about and I decided to make a jungle timer. It's coded in Delphi and pretty simple, but includes some neat features. Well, download, comment, use it. It's transparent and always on top, be sure to run LoL in Borderless Options, to see it the whole time. Also it includes a sound notification, for every specific buff/monster
[Release] Jungle Timer
11/18/2012 - League of Legends Hacks, Bots, Cheats & Exploits - 0 Replies
Hey guys, I've been thinking about my first program could be about and I decided to make a jungle timer. It's coded in Delphi and pretty simple, but includes some neat features. Well, download, comment, use it. It's transparent and always on top, be sure to run LoL in Borderless Options, to see it the whole time. It also includes a sound feature, which alarms you with a individual sound for every buff. Thank you :)
[Release] DBM's Flo Timer
12/07/2011 - Florensia - 16 Replies
DBM's Flo Timer Um das Bosse farmen etwas attraktiver zu machen, gibt's nun auch einen Boss-Timer. Dieser entstand vorerst nur zur persönlichen Nutzung, aber nun soll er noch erweitert und der Öffentlichkeit zur Verfügung gestellt werden :awesome: Funktionen: - Countdown bis Boss-Spawn - Multilanguage (Deutsch/Englisch) - Download/Upload Funktion um Timer mit Freunden/Gilde zu teilen - Updatefunktion
[Release] Better Timer
10/23/2008 - CO2 Private Server - 8 Replies
If you Noob: Stop Reading! The most People using 2 Timers or more, i show you an way how to use only 1. Create in Character.cs for Player the "public DateTime TestCheck;" public static System.Timers.Timer MainTimer; MainTimer = new System.Timers.Timer(); MainTimer.Interval = 100; MainTimer.Elapsed += new ElapsedEventHandler(MainTimer_System); MainTimer.Start();



All times are GMT +1. The time now is 10:41.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.