Exemplo n.º 1
0
        protected Player(string name, IAttacking attacking)
        {
            Console.WriteLine($"New player created of class: {name}");

            _name      = name;
            _attacking = attacking;
        }
Exemplo n.º 2
0
    private void Start()
    {
        Attacking = GetComponent <IAttacking>();
        Attacking.AssignAttackEvent(OnAttackEvent);
        SetWeaponData(StartingWeapon);

        CurrentHealth = Health;
    }
    public void FireArrow(IAttacking attackMethod)//starts moving the arrow towards the target
    {
        Vector3 currentTargetPos = BattleController.currentTarget.transform.position;

        targetPosition = currentTargetPos + targetPosAdj; //clarifies target coordinates
        dealsDamage    = attackMethod;
        ArrowFlies     = true;                            //starts moving the arrow
    }
Exemplo n.º 4
0
    public void FireArrow(IAttacking attackMethod)// comienza a mover la flecha hacia el objetivo
    {
        Vector3 currentTargetPos = BattleController.currentTarget.transform.position;

        targetPosition = currentTargetPos + targetPosAdj; // aclara las coordenadas del objetivo
        dealsDamage    = attackMethod;
        ArrowFlies     = true;                            // comienza a mover la flecha
    }
Exemplo n.º 5
0
    void Start()
    {
        attacker = transform.parent.gameObject.GetComponent <IAttacking>();
        isHit    = false;

        if (hitboxes.Length == 0)
        {
            hitboxes = this.GetComponents <BoxCollider2D>();
        }

        hurtboxes = new List <Collider2D>(50);
        enemies   = new List <GameObject>(20);
    }
Exemplo n.º 6
0
 public AttackState(IAttacking attacking)
 {
     this.attacking = attacking;
 }