示例#1
0
    //----------------------------------------------------------------------
    //! @brief ウィルスコントロール状態か
    //!
    //! @param[in] なし
    //!
    //! @return true:Yes false:No
    //----------------------------------------------------------------------
    public bool IsAction()
    {
        bool result = false;

        bool  key   = Input.GetKey(m_actionButton);
        float x     = Input.GetAxisRaw("Horizontal2");
        float z     = Input.GetAxisRaw("Vertical2");
        bool  con   = Mathf.Abs(x) + Mathf.Abs(z) > 0.4;
        bool  virus = m_virusAmount.GetVirusAmount() > 0;

        // アクションキーが押されていてウィルスがある場合true
        result = (key | con) & virus;
        return(result);
    }
 //----------------------------------------------------------------------
 //! @brief 更新処理
 //!        画像を徐々に消していく
 //!
 //! @param[in] なし
 //!
 //! @return なし
 //----------------------------------------------------------------------
 void Update()
 {
     VirusLeftImage.fillAmount  = virusAmount.GetVirusAmount() * 0.01f;
     VirusRightImage.fillAmount = virusAmount.GetVirusAmount() * 0.01f;
 }