Beispiel #1
0
 protected void ObjectComponents()
 {
     rb2d            = GetComponent <Rigidbody2D>();
     spriteRend      = GetComponent <SpriteRenderer>();
     boulder         = boulderController.boulder;
     timeRune        = RuneScriptTime.rune;
     boulderCollider = boulder.GetComponent <CircleCollider2D>();
     selfCollider    = GetComponent <BoxCollider2D>();
     anim            = GetComponent <Animator>();
     pS           = playerStats.stats;
     hDirection   = 0;
     dropRotation = new Quaternion(transform.rotation.x, transform.rotation.y, 0, transform.rotation.w);
     wetGrav      = 2;
     wet          = false;
 }
Beispiel #2
0
 protected void ObjectComponents()
 {
     pS   = playerStats.stats;
     rb2d = GetComponent <Rigidbody2D>();
     anim = GetComponent <Animator>();
     anim.SetTrigger(LootType);
     AudioSource[] sounds = GetComponents <AudioSource>();
     soundCollectBounce = sounds[2];
     soundBounce        = sounds[1];
     soundGet           = sounds[0];
     rb2d.velocity      = new Vector3(Random.Range(-horizVelocity, horizVelocity), Random.Range(vertVelocityMin, vertVelocityMax), 0);
     bronzeValue        = 1;
     silverValue        = 5;
     goldValue          = 10;
     platinumValue      = 25;
     autoCollectHoriz   = false;
     boulder            = boulderController.boulder;
     boulderCollider    = boulder.GetComponent <CircleCollider2D>();
     coinCollider       = GetComponent <CircleCollider2D>();
 }