void Start() { this.cam = GameObject.FindGameObjectWithTag("MainCamera"); this.Gamemaster = GameObject.FindGameObjectWithTag("GameController"); this.gameMasterAttributes = this.Gamemaster.GetComponent<GameMaster>(); this.waveSpawner = this.Gamemaster.GetComponent<Wavespawner>(); this.bubble = transform.gameObject; this.bubbles = this.gameMasterAttributes.bubbles; this.curve = this.gameMasterAttributes.curve; this.mathe = this.curve.GetComponent<BGCcMath>(); this.cursor = this.mathe.gameObject.AddComponent<BGCcCursor>(); this.rigidBodyAttr = transform.GetComponent<Rigidbody>(); this.rotationSpeed = 150; this.currentWaypoint = this.cursor.CalculateSectionIndex(); this.movedBubbleRow = new Transform[this.bubbles.childCount]; if (!this.isShooted) { this.checkBubbleState(); if (!this.isFirstBubble) { this.bubble.GetComponent<MoveOnSpline>().distanceCalc = this.bubble.GetComponent<Bubble>().beforeBubble.GetComponent<MoveOnSpline>().distanceCalc - this.gameMasterAttributes.bubbleSizeAverage; } } }
public ExplosionProvider(Bubble bubble) { this.bubbleAttr = bubble; this.gameMaster = GameObject.FindGameObjectWithTag("GameController"); this.gameMasterAttr = this.gameMaster.GetComponent <GameMaster>(); this.bubbles = this.bubbleAttr.bubbles; this.waveSpawner = this.bubbleAttr.waveSpawner; this.bubbleTransform = this.bubbleAttr.transform; }
void Start() { spawner = GetComponent <Wavespawner>(); game = FindObjectOfType <GameManager>(); extra = FindObjectOfType <WaveEndExtraManager>(); _waveNumber = 0; _spawning = false; startTime = float.MinValue; }
void Start() { this.player = FindObjectOfType <PlayerMover>(); this.wavespawner = FindObjectOfType <Wavespawner>(); this.gameManager = FindObjectOfType <GameManager>(); }