// Start is called before the first frame update
 void Start()
 {
     rbody       = GetComponent <Rigidbody2D>();
     isoRenderer = GetComponentInChildren <IsoCharacterRenderer>();
     _stats      = GetComponent <Temp_MC_Stats>();
     _direction  = new Vector3(1, 1, 0);
     _direction.Normalize();
     _muzzle_offset = new Vector3(0f, 0.3f, 0f);
     _nextAttack    = 0;
 }
Exemplo n.º 2
0
    private void OnTriggerEnter2D(Collider2D collision)
    {
        if (collision.CompareTag("Player"))
        {
            Temp_MC_Stats player = FindObjectOfType <Temp_MC_Stats>();

            if (player != null)
            {
                FindObjectOfType <SoundManager>().PlaySound("CoinPickup");
                player.curGold += GoldValue;
                Destroy(gameObject);
            }
        }
    }
Exemplo n.º 3
0
 // Start is called before the first frame update
 void Start()
 {
     animator = GetComponent <Animator>();
     _stats   = GetComponent <Temp_MC_Stats>();
 }
Exemplo n.º 4
0
 void Start()
 {
     player      = FindObjectOfType <Temp_MC_Stats>();
     playerspeed = FindObjectOfType <IsoMovementController>();
 }