public override void Initialize(Transform location, ToolComponentReferences references)
    {
        _controls = new InputMaster();
        _controls.Fishing.Enable();

        _resources = references.CastingComponentList.ChasingResources;

        Prefab = Instantiate(_resources.CastingChasingPrefab, location.transform.position, location.transform.rotation);
        CastingComponentHolder c = Prefab.GetComponent <CastingComponentHolder>();

        _fishingTarget   = c.FishingTarget;
        _fishingProgress = c.FishingProgress;
        _castingArc      = c.CastingArc;
        _castingTarget   = c.CastingTarget;

        _castingTarget.SetActive(false);
        _castingArc.SetActive(false);
        _fishingProgress.SetActive(false);

        SetValues();

        _fishingState = 1;

        _controls.Fishing.FishingMovement.performed += ctx => _fishingMovementForce = ctx.ReadValue <Vector2>();
        _controls.Fishing.FishingMovement.canceled  += ctx => _fishingMovementForce = Vector2.zero;
    }
Example #2
0
    //TODO: Create reference to player's fishing rod
    public override void Initialize(UseItemStateMachine parent, ToolData tool, Transform location, ToolComponentReferences references)
    {
        //Debug.Log("Let's go!");
        _fishingLocation = location;

        toolReferences = references;

        parentStateMachine = parent;
        PlayerTool         = tool;
        playerRod          = (ToolRodData)PlayerTool;
        CreateAssets();
        _rodFishingState = 1;
    }
Example #3
0
    public override void Initialize(Transform location, ToolComponentReferences references)
    {
        _resources = references.CastingComponentList.WaitingResources;

        Prefab = Instantiate(_resources.CastingWaitingPrefab, location.transform.position, location.transform.rotation);
        CastingComponentHolder c = Prefab.GetComponent <CastingComponentHolder>();

        _fishingTarget   = c.FishingTarget;
        _fishingProgress = c.FishingProgress;
        _castingArc      = c.CastingArc;
        _castingTarget   = c.CastingTarget;

        _castingTarget.SetActive(false);
        _castingArc.SetActive(false);
        _fishingProgress.SetActive(false);

        SetValues();

        _fishingState = 1;
    }
    public override void Initialize(Transform location, ToolComponentReferences references)
    {
        _resources = references.CastingComponentList.PulsingResources;
        //   GameObject g = GameObject.Find("CastingPulsing");
        //_helper = Instantiate(resources.castingPrefab, location.transform.position, location.transform.rotation, this.transform);
        // _helper = Instantiate(g, location.transform.position, location.transform.rotation, this.transform);
        Prefab = Instantiate(_resources.CastingPulsingPrefab, location.transform.position, location.transform.rotation);
        CastingComponentHolder c = Prefab.GetComponent <CastingComponentHolder>();

        _fishingTarget   = c.FishingTarget;
        _fishingProgress = c.FishingProgress;
        _castingTarget   = c.CastingTarget;


        _fishingProgress.SetActive(false);
        _castingTarget.SetActive(false);

        SetValues();
        _fishingState = 1;
    }
Example #5
0
 public abstract void Initialize(UseItemStateMachine parent, ToolData tool, Transform location, ToolComponentReferences references);
Example #6
0
 public abstract void Initialize(Transform location, ToolComponentReferences references);
Example #7
0
    //TODO: Create reference to player's fishing spear
    public override void Initialize(UseItemStateMachine parent, ToolData tool, Transform location, ToolComponentReferences references)
    {
        Debug.Log("Let's go!");
        parentStateMachine = parent;
        PlayerTool         = tool;

        CreateAssets();
    }