Example #1
0
    private void Update()
    {
        float time = gameManager.GetTimeManager().GetTime();

        if (start >= time && time >= end + animator.GetCurrentAnimatorStateInfo(0).length)
        {
            if (!isActiveTime)
            {
                isActiveTime = true;
                RespownTarget();
            }
        }
        else
        {
            if (isActiveTime)
            {
                delayTimer.StopTimer(0);
                isActiveTime = false;
                DespownTarget();
            }
        }
    }
Example #2
0
        public void SetContent(GameObject obj)
        {
            gameObject.SetActive(true);
            if (_content != null)
            {
                Destroy(_content);
                DelayTimer.StopTimer(_timerIndex);
            }
            _content = obj;

            RectTransform rTf = obj.GetComponent <RectTransform>();

            rTf.parent = Content.transform;
            ResetSize(rTf.rect);

            rTf.localPosition = Vector3.zero;//new Vector3(-rTf.rect.size.x / 2 - Interval / 2, rTf.rect.size.y / 2 + Interval/2);
            rTf.localScale    = Vector3.one;

            _timerIndex = DelayTimer.StartTimer(GameConfig.ChatShowTime, () =>
            {
                Reset();
            });
        }
 public override void OnPickup()
 {
     delayTimer.StopTimer(0);
     gameManager.GetScoreManager().SetDataOwnership(Networking.LocalPlayer, playerID);
     gameManager.GetNameManager().SetNameLateSync(Networking.LocalPlayer, playerID, Networking.LocalPlayer.displayName);
 }