コード例 #1
0
    // Update is called once per frame
    void Update()
    {
        movement();

        if (Input.GetKeyDown(KeyCode.R))
        {
            if (AttackEvent != null)
            {
                foreach (Delegate d in AttackEvent.GetInvocationList())
                {
                    AttackEvent -= (VoidWithNoArguments)d;
                }
            }
        }

        if (Input.GetKeyDown(KeyCode.Space) || Input.GetKeyDown(KeyCode.Mouse0))
        {
            shoot();
        }
    }