mirror of
https://github.com/imayushsaini/Bombsquad-Ballistica-Modded-Server.git
synced 2025-10-20 00:00:39 +00:00
Tag Animation code block
Thanks to @itsre3
This commit is contained in:
parent
97404c81f2
commit
d5467ba239
1 changed files with 12 additions and 2 deletions
14
dist/ba_root/mods/spazmod/tag.py
vendored
14
dist/ba_root/mods/spazmod/tag.py
vendored
|
|
@ -41,6 +41,7 @@ def addhp(node):
|
|||
class Tag(object):
|
||||
def __init__(self,owner=None,tag="somthing",col=(1,1,1)):
|
||||
self.node=owner
|
||||
sett = setting.get_settings_data()
|
||||
mnode = ba.newnode('math',
|
||||
owner=self.node,
|
||||
attrs={
|
||||
|
|
@ -79,7 +80,16 @@ class Tag(object):
|
|||
'h_align': 'center'
|
||||
})
|
||||
mnode.connectattr('output', self.tag_text, 'position')
|
||||
|
||||
if sett["enableTagAnimation"]:
|
||||
ba.animate_array(node=self.tag_text, attr='color', size=3, keys={
|
||||
0.2: (2,0,2),
|
||||
0.4: (2,2,0),
|
||||
0.6: (0,2,2),
|
||||
0.8: (2,0,2),
|
||||
1.0: (1,1,0),
|
||||
1.2: (0,1,1),
|
||||
1.4: (1,0,1)
|
||||
}, loop=True)
|
||||
class Rank(object):
|
||||
def __init__(self,owner=None,rank=99):
|
||||
self.node=owner
|
||||
|
|
@ -127,4 +137,4 @@ class HitPoint(object):
|
|||
def a():
|
||||
self._Text.delete()
|
||||
m.delete()
|
||||
self.timer = ba.Timer(100, ba.Call(a), timetype=ba.TimeType.SIM, timeformat=ba.TimeFormat.MILLISECONDS)
|
||||
self.timer = ba.Timer(100, ba.Call(a), timetype=ba.TimeType.SIM, timeformat=ba.TimeFormat.MILLISECONDS)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue