public void setActive(ConveyorController c) { var con = GetComponent <AffectedByConveyor> (); con.conveyor = c; con.isActive = true; isActive = true; }
// Use this for initialization void Start() { conveyorController = GameObject.FindObjectOfType <ConveyorController>(); canRigidbody = GetComponent <Rigidbody2D>(); soundController = GameObject.FindObjectOfType <SoundController>(); spriteRenderer = GetComponent <SpriteRenderer>(); spriteRenderer.sprite = canSprites[PlayerPrefsManager.GetTheme()]; currentXPosition = gameObject.transform.position.x; }
// Use this for initialization void Start() { scoreController = GameObject.FindObjectOfType <ScoreController>(); bonusValueText = gameObject.transform.parent.GetComponentInChildren <Text>(); bonusController = GameObject.FindObjectOfType <BonusController>(); conveyorController = GameObject.FindObjectOfType <ConveyorController>(); soundController = GameObject.FindObjectOfType <SoundController>(); currentBonusValue = baseBonusValue; UpdateBonusValueText(); }
// Use this for initialization void Start() { gameController = GameObject.FindObjectOfType <GameController>(); conveyorController = GameObject.FindObjectOfType <ConveyorController>(); bonusController = GameObject.FindObjectOfType <BonusController>(); soundController = GameObject.FindObjectOfType <SoundController>(); gameObject.transform.position = new Vector3(startXPos, transform.position.y, transform.position.z); currentXPos = startXPos; endGame = false; foreach (Grinder grinder in GameObject.FindObjectsOfType <Grinder>()) { grinder.SetBonusValue(gameObject); } // play entry sound if (gameObject.tag != "MiniBoss") { soundController.PlayStandardEnemyEntryClip(); } }
void Awake() { line = GetComponent <LineRenderer>(); cc = GameObject.FindObjectOfType <ConveyorController>(); }
// Start is called before the first frame update void Start() { gc = GameObject.FindObjectOfType <GameController>(); cc = GameObject.FindObjectOfType <ConveyorController>(); numPos = cc.conveyorPositions.Count; }
private void Start() { _conveyorController = GetComponentInParent<ConveyorController>(); }
void Start() { conveyorController = GameObject.Find("Сonveyor").GetComponent <ConveyorController>(); startPos = transform.position; }
// Use this for initialization void Start() { conveyorController = GameObject.FindObjectOfType <ConveyorController>(); }
private void Start() { gc = GameObject.FindObjectOfType <GameController>(); cc = GameObject.FindObjectOfType <ConveyorController>(); conveyorLength = cc.conveyorLength; }