Ejemplo n.º 1
0
 void Update()
 {
     if (isshow)
     {
         float movespeed = speed * Time.deltaTime;
         txt_racelamp.transform.localPosition -= new Vector3(movespeed, 0, 0);
         totalmovex += movespeed;
         if (txtwidth <= 0)
         {
             txtwidth = (int)txt_racelamp.rectTransform.rect.width;
         }
         if (totalmovex >= (txtwidth + maskwidth))
         {
             lampcount += 1;
             if (lampcount == lp.count)
             {
                 isshow      = false;
                 currentType = HorseRaceLampType.None;
             }
             else
             {
                 txt_racelamp.transform.localPosition = txt_racelamp_localpostion;
                 totalmovex = 0;
             }
         }
     }
 }
Ejemplo n.º 2
0
 public void Init(LampMessage lamp)
 {
     lp = lamp;
     txt_racelamptext = lp.text;
     currentType      = lamp.type;
     txt_racelamp.transform.localPosition = txt_racelamp_localpostion;
     totalmovex = 0;
 }