private void Awake() { playerInputs = GetComponent <PlayerInputs>(); playerCombat = GetComponent <PlayerCombat>(); playerHealth = GetComponent <PlayerHealth>(); playerMovements = GetComponent <PlayerMovements>(); playerCollision = GetComponent <PlayerCollision>(); }
private void OnTriggerEnter2D(Collider2D other) { Player.PlayerCombat player = other.GetComponent <Player.PlayerCombat>(); if (player == null) { return; } potionSystem.AddPotion(); Destroy(gameObject); }
private void Start() { GameObject p = GameObject.FindWithTag("Player"); movement = p.GetComponent <PlayerMovement>(); combat = p.GetComponent <PlayerCombat>(); player = p.transform; cam = Camera.main; }
public override void Attack(Player.PlayerCombat player) { var isEnemy = Physics2D.OverlapCircle(player.transform.Find("Weapon").position, 0.5f, enemyLayer); player.transform.GetComponent <Animation>().Play("shortAttack"); if (isEnemy) { isEnemy.gameObject.GetComponent <Enemy.EnemyController>().Damage(damageAmount); } }
public abstract void LongAttack(Player.PlayerCombat player);
public abstract void Setup(Player.PlayerCombat player);