// Start is called before the first frame update


    void Start()
    {
        target = new Vector2(0.0f, 0.0f);
        meteorSpawnerScript   = meteorSpawner.GetComponent <MeteorSpawnerScript>();
        bossPeanutMakerScript = myParent.GetComponent <BossPeanutMaker>();
        speed            = normalSpeed;
        mySpriteRenderer = GetComponent <SpriteRenderer>();
    }
Beispiel #2
0
    // Start is called before the first frame update
    void Start()
    {
        waypoints          = waveConfig.GetWayPoints();
        transform.position = waypoints[waypointIndex].transform.position;
        gameSession        = FindObjectOfType <GameSession>();

        if (isBossPeanut)
        {
            myBossPeanutMakerScript = gameObject.GetComponent <BossPeanutMaker>();
        }
    }
Beispiel #3
0
 // Start is called before the first frame update
 void Start()
 {
     shotCounter      = Random.Range(minTimeBetweenShots, maxTimeBetweenShots);
     mySpriteRenderer = GetComponent <SpriteRenderer>();
     myTransform      = GetComponent <Transform>();
     myScriptEnemy    = GetComponent <Enemy>();
     gameSession      = FindObjectOfType <GameSession>();
     if (bossPeanutMaker)
     {
         bossPeanutScript = FindObjectOfType <BossPeanutMaker>().GetComponent <BossPeanutMaker>();
     }
 }
    void Start()
    {
        bossPeanutMaker       = FindObjectOfType <BossPeanutMaker>().gameObject;
        bossPeanutMakerScript = bossPeanutMaker.GetComponent <BossPeanutMaker>();
        transform.localScale  = new Vector3(0, 0, 0);
        StartCoroutine(BreakFreeFromParentTransform());
        mySpriteRenderer       = GetComponent <SpriteRenderer>();
        myAudioSource          = GetComponent <AudioSource>();
        mySpriteRenderer.color = myColor;
        myAudioSource.volume   = 0.25f;

        Player playerInScene = (Player)FindObjectOfType(typeof(Player));

        if (playerInScene)
        {
            noPlayerInScene = false;
        }
        else
        {
            noPlayerInScene = true;
        }

        bossPeanutMakerScript.AddExplodePeanut(gameObject);
    }