protected Player(string name, IAttacking attacking) { Console.WriteLine($"New player created of class: {name}"); _name = name; _attacking = attacking; }
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 }
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 }
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); }
public AttackState(IAttacking attacking) { this.attacking = attacking; }