// Use this for initialization public PowerUp() { player = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerController>(); bulletPool = GameObject.FindGameObjectWithTag("BulletPool").GetComponent <BulletPoolController>(); cam = Camera.main; type = "Empty"; activationTime = 5f; baseActivationTime = activationTime; isActivated = false; isHidden = true; baseDamage = bulletPool.getBulletDamage(); damageMultiplier = 4f; slowTimeScale = 0.5f; postProcessor = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <PostProcessingController>(); }
// Use this for initialization void Start() { healthPoints = MAXHEALTH; timeSinceLastHealthLoss = 0f; invulnerabilityTime = 1f; points = 0; hasShot = false; isVerticalInput = false; isHorizontalInput = false; isMoving = false; isAlive = true; torso = transform.GetChild(0).gameObject; reticle = transform.GetChild(1).gameObject; legs = transform.GetChild(2).gameObject; torsoAnimator = torso.GetComponent <Animator>(); legsAnimator = legs.GetComponent <Animator>(); waveController = GameObject.FindGameObjectWithTag("Wave Manager").GetComponent <WaveController>(); trader = GameObject.FindGameObjectWithTag("Trader").GetComponent <TraderController>(); itemPool = GameObject.FindGameObjectWithTag("ItemPool").GetComponent <ItemPoolController>(); powerup = itemPool.getMainPowerup(); bulletPool = GameObject.FindGameObjectWithTag("BulletPool").GetComponent <BulletPoolController>(); speed = 800f; healthPoints = 3; rb2d = GetComponent <Rigidbody2D>(); uiObject = GameObject.FindGameObjectWithTag("UI"); ui = uiObject.GetComponent <UIController>(); deathMenuObject = GameObject.FindGameObjectWithTag("DeathMenu"); internalTimeScale = 1f; shootCooldownTime = 0.02f; timeSinceShot = shootCooldownTime; mainCam = Camera.main; transform.position = new Vector3(0, 0, 0); }
// Use this for initialization void Awake() { free = true; isProtectedByShield = false; player = GameObject.FindGameObjectWithTag("Player"); rb2d = GetComponent <Rigidbody2D>(); body = transform.GetChild(0).gameObject; anim = body.GetComponent <Animator>(); anim.SetTrigger("Teleport"); fireBallPool = GameObject.Find("FireBallPool").GetComponent <BulletPoolController>(); fire = false; teleport = false; teleportRadiusMax = 20; teleportRadiusMin = 16; timeSinceLastChange = 0f; arenaRadius = GameObject.FindGameObjectWithTag("Walls").GetComponent <WallsController>().getRadius(); boundsLength = body.GetComponent <SpriteRenderer>().bounds.extents.magnitude; }
public void SetPoolController(BulletPoolController _bulletPoolController) { bulletPoolController = _bulletPoolController; }
public void setBulletContainer(BulletPoolController newBulletContainer) { bulletContainer = newBulletContainer; }
void Awake() { BulletPoolInstance = this; }