示例#1
0
    private void Awake()
    {
        if (_singleInstance == null)
        {
            _singleInstance = this;
        }

        _camera = Camera.main;
        AssignComponents("Background");
        SetControl();
    }
    void Shoot()
    {
        PlayerKnife newKnife = Instantiate(knifePrefab).GetComponent <PlayerKnife>();

        newKnife.Initialize(transform.position, Vector3.Normalize(transform.forward));
    }