示例#1
0
 // Use this for initialization
 void Start()
 {
     anim    = GetComponent <Animator>();
     invRune = RuneScriptInv.rune;
     anim.SetBool("activation", true);
     boulderCtrl = boulderController.boulder;
 }
示例#2
0
 // Use this for initialization
 void Start()
 {
     boulder = boulderController.boulder;
     anim    = GetComponent <Animator>();
     sprite  = GetComponent <SpriteRenderer>();
     alpha   = 1f;
 }
示例#3
0
 // Use this for initialization
 void Awake()
 {
     //This allows this object to be the only object in existance
     if (boulder == null)
     {
         boulder = this;
     }
     else if (boulder != this)
     {
         Destroy(gameObject);
     }
 }
示例#4
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;
 }
示例#5
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>();
 }
 // Use this for initialization
 void Start()
 {
     boulder       = boulderController.boulder;
     sound         = GetComponent <AudioSource>();
     sound.enabled = false;
 }