Example #1
0
 /// <summary>
 /// Method to allow custom data initialization.
 /// </summary>
 public override void InitData()
 {
     base.InitData();
     if (bulletManager == null)
     {
         bulletManager = FindObjectOfType<BulletManager>();
     }
     SetAttackTimer();
 }
Example #2
0
 public override void InitData()
 {
     hit = false;
     render = true;
     invulerability = 0f;
     currentHealth = health;
     bulletManager = FindObjectOfType<BulletManager>();
     weapons.GetWeapons();
     camera = FindObjectOfType<Camera>();
 }
Example #3
0
 public override void InitData()
 {
     hit = false;
     render = true;
     invulerability = 0f;
     currentHealth = totalHealth;
     bulletManager = FindObjectOfType<BulletManager>();
     weapons.GetWeapons();
     camera = FindObjectOfType<Camera>();
     animator = GetComponent<Animator>();
     bodyRenderer = GetComponent<SpriteRenderer>();
     gunRenderer = transform.FindChild("Gun").GetComponent<SpriteRenderer>();
 }
Example #4
0
        /// <summary>
        /// Method to allow custom data initialization.
        /// </summary>
        public override void InitData()
        {
            base.InitData();
            if (player == null)
            {
                player = FindObjectOfType<PlayerManager>().GetPlayer().gameObject;
            }
            if (bulletManager == null)
            {
                bulletManager = FindObjectOfType<Managers.BulletManager>();
            }

            currentBullets = 0;
            shootTimer = -reloadTime;
        }
Example #5
0
 public override void InitData()
 {
     hit = false;
     render = false;
     invulerability = 0f;
     currentHealth = totalHealth;
     bulletManager = FindObjectOfType<BulletManager>();
     weapons.GetWeapons();
     camera = FindObjectOfType<Camera>();
     animator = GetComponent<Animator>();
     bodyRenderer = GetComponent<SpriteRenderer>();
     gunRenderer = transform.FindChild("Gun").GetComponent<SpriteRenderer>();
     colliderSideOffset = front.localPosition;
     height = GetComponent<BoxCollider2D>().bounds.extents.y * 2;
 }