Beispiel #1
0
    protected virtual void Start()
    {
        MyRigidBody2D = gameObject.GetComponent <Rigidbody2D>();
        MyAnimator    = gameObject.GetComponent <Animator>();

        StartPosition = transform.position;

        PlayerStats = GameObject.FindGameObjectWithTag(PlayerTag).GetComponent <ThorStats>();
    }
Beispiel #2
0
    private void OnTriggerEnter2D(Collider2D collision)
    {
        if (collision.gameObject.CompareTag(PlayerTag))
        {
            ThorStats PlayerStats = GameObject.FindGameObjectWithTag(PlayerTag).GetComponent <ThorStats>();

            PlayerStats.TakeDamage(Damage);
        }

        Destroy(gameObject);
    }
Beispiel #3
0
 private void Start()
 {
     PlayerStats = GameObject.FindGameObjectWithTag(PlayerTag).GetComponent <ThorStats>();
 }
Beispiel #4
0
 private void Start()
 {
     PlayerStats = GetComponent <ThorStats>();
 }
Beispiel #5
0
 private void Start()
 {
     Thor        = Player.GetComponent <Thor>();
     ThorStats   = Player.GetComponent <ThorStats>();
     AreaManager = GetComponent <AreaManager>();
 }
Beispiel #6
0
 private void Start()
 {
     PlayerStats    = Player.GetComponent <ThorStats>();
     PlayerMovement = Player.GetComponent <Thor>();
     AreaManager    = GetComponent <AreaManager>();
 }
Beispiel #7
0
 private void Start()
 {
     Stats = GameObject.FindGameObjectWithTag(TargetTag).GetComponent <ThorStats>();
 }