private void InitializeAimingPointsArray(Transform attackPosition, D_PlayerBowArrowShotState playerFireArrowShotData)
    {
        _points = new GameObject[playerFireArrowShotData.numberOfAimingPoints];

        GameObject aimingPoint          = playerFireArrowShotData.aimingPoint;
        int        numberOfAimingPoints = playerFireArrowShotData.numberOfAimingPoints;

        for (int i = 0; i < numberOfAimingPoints; i++)
        {
            _points[i] = GameObject.Instantiate(aimingPoint, attackPosition.position, Quaternion.identity);
            _points[i].transform.SetParent(Player.AimingPointWrapper);
            _points[i].SetActive(false);
        }
    }
Exemplo n.º 2
0
 public PlayerBowFireArrowShotState_Finish(Player player, PlayerFiniteStateMachine playerFiniteStateMachine, string animationBoolName, Transform attackPosition,
                                           D_PlayerBowArrowShotState playerFireArrowShotData) : base(player, playerFiniteStateMachine, animationBoolName, attackPosition, playerFireArrowShotData)
 {
 }
 public PlayerBowFireArrowShotState_Aim(Player player, PlayerFiniteStateMachine playerFiniteStateMachine, string animationBoolName, Transform attackPosition,
                                        D_PlayerBowArrowShotState playerFireArrowShotData) : base(player, playerFiniteStateMachine, animationBoolName, attackPosition, playerFireArrowShotData)
 {
     InitializeAimingPointsArray(attackPosition, playerFireArrowShotData);
 }