Exemplo n.º 1
0
 void OnEnable()
 {
     Collider2D  = GetComponent <CircleCollider2D>();
     Rigidbody2D = GetComponent <Rigidbody2D>();
     _parent     = (GameObjects.InteractingObjects.Player.Player)GetComponentInParent(typeof(GameObjects.InteractingObjects.Player.Player));
     AudioSource = GetComponent <AudioSource>();
     Physics2D.IgnoreCollision(Collider2D, _parent.BoxCollider2D);
 }
Exemplo n.º 2
0
        protected void Awake()
        {
            HeadRigidbody2D = GetComponent <Rigidbody2D>();
            SpriteRenderer  = GetComponent <SpriteRenderer>();
            AudioSource     = GetComponent <AudioSource>();
            Parent          = transform.parent.GetComponent <GameObjects.InteractingObjects.Player.Player>();

            base.Awake("Textures/Player/PlayerHead/");
        }
Exemplo n.º 3
0
 public PlayerHitpoints(GameObjects.InteractingObjects.Player.Player player)
 {
     _player = player;
 }