// Start is called before the first frame update void Start() { rb = GetComponent <Rigidbody2D>(); _controller = GetComponent <TDCharacterController2D>(); _particleSystemObject = gameObject.transform.GetChild(1).gameObject; _particleSystem = _particleSystemObject.GetComponent <ParticleSystem>(); _spriteRenderer = gameObject.GetComponent <SpriteRenderer>(); _collider = gameObject.GetComponent <CircleCollider2D>(); }
protected override void Start() { _controller = GetComponent <TDCharacterController2D>(); GameManager.Instance.AddEnemyToList(this); //_animator = GetComponent<Animator>(); _target = GameManager.Instance.playerTransform; _player = GameManager.Instance.player; healthFill = HealthFillGameObject.GetComponent <RectTransform>(); maxHealth = Health; base.Start(); }
// Use this for initialization protected override void Start() { _controller = GetComponent <TDCharacterController2D>(); _animator = GetComponent <Animator>(); _inventoryPanel = GameManager.Instance.inventoryPanel; Inventory.Instance.OnEquippableItemAdded += SetAttributes; SetAttributes(this, null); _currentHealthPoints = 100; UpdateHealthText(); base.Start(); }