예제 #1
0
 // 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>();
 }
예제 #2
0
 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();
 }
예제 #3
0
 // 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();
 }