public void setActive(ConveyorController c)
    {
        var con = GetComponent <AffectedByConveyor> ();

        con.conveyor = c;
        con.isActive = true;
        isActive     = true;
    }
Exemple #2
0
    // 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;
    }
Exemple #3
0
    // 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();
    }
Exemple #4
0
    // 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();
        }
    }
Exemple #5
0
 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;
 }
Exemple #7
0
 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>();
 }
Exemple #10
0
 private void Start()
 {
     gc             = GameObject.FindObjectOfType <GameController>();
     cc             = GameObject.FindObjectOfType <ConveyorController>();
     conveyorLength = cc.conveyorLength;
 }