Esempio n. 1
0
        protected virtual void Initialization()
        {
            _mmFollowTarget = this.gameObject.GetComponent <MMFollowTarget>();
            _mmFollowTarget.FollowPosition = false;

            TargetBuyZone.Title.text       = Data.Title;
            TargetBuyZone.Description.text = Data.Description;
            TargetBuyZone.Bonus.text       = "+ " + Data.Bonus.ToString();
            TargetBuyZone.Malus.text       = "- " + Data.Malus.ToString();

            _waitForSecondsFollowing = new WaitForSeconds(StartFollowingAfterDelay);

            Direction = (Container.transform.localEulerAngles.y == 0) ? 1 : -1;

            Body.GetComponent <SpriteRenderer>().sprite = Data.BodySprite;
        }
 /// <summary>
 /// Grabs and stores components
 /// </summary>
 protected virtual void Initialization()
 {
     _rigidbody2D = this.gameObject.GetComponent <Rigidbody2D>();
     _throwColliderCooldownWaitForSeconds = new WaitForSeconds(ThrowColliderCooldown);
     _followTarget = this.gameObject.GetComponent <MMFollowTarget>();
 }