コード例 #1
0
ファイル: CharacterData.cs プロジェクト: tanakatanaka/Example
 // Update is called once per frame
 private void Update()
 {
     Stats.Tick();
     if (m_AttackCoolDown > 0.0f)
     {
         m_AttackCoolDown -= Time.deltaTime;
     }
 }
コード例 #2
0
        // Update is called once per frame
        void Update()
        {
            Stats.Tick();

            if (m_AttackCoolDown > 0.0f)
            {
                m_AttackCoolDown -= Time.deltaTime;
            }

            if (invincible)
            {
                if (invincibleTimer >= invincibleTime)
                {
                    invincibleTimer = 0f;
                    invincible      = false;
                }

                invincibleTimer += Time.deltaTime;
            }
        }