void OnSceneGUI()
    {
        CollectibleSpawner myTarget = (CollectibleSpawner)target;
        Color fillColour;
        Color outlineColour;

        fillColour    = new Color(0.8f, 1.0f, 0.8f, 0.3f);
        outlineColour = new Color(0f, 1f, 0f, 0.3f);

        Handles.DrawSolidRectangleWithOutline(myTarget.spawnArea, fillColour, outlineColour);
    }
Beispiel #2
0
    void Awake()
    {
        if (instance == null)
        {
            instance = this;
        }

        if (patterns.Length == 0)
        {
            Debug.LogError("Coloque alguma pattern, animal de tetas");
        }
    }
Beispiel #3
0
 // Start is called before the first frame update
 void Start()
 {
     player                     = GameObject.FindGameObjectWithTag("Eater").transform;
     lastSpawnPoint             = GameObject.FindGameObjectWithTag("LastSpawnPoint");
     lastPowerupPosition        = GameObject.FindGameObjectWithTag("LastPowerupSpawnPoint");
     lastCollectiblePoint       = GameObject.FindGameObjectWithTag("LastCollectibleSpawnPoint");
     spawner                    = GameObject.FindGameObjectWithTag("Spawner").GetComponent <Spawner>();
     powerupSpawner             = GameObject.FindGameObjectWithTag("PowerupSpawner").GetComponent <PowerupSpawner>();
     collectibleSpawner         = GameObject.FindGameObjectWithTag("CollectibleSpawner").GetComponent <CollectibleSpawner>();
     powerupSpawnDifference     = maxSpawnDifference;
     collectibleSpawnDifference = maxSpawnDifference;
 }
Beispiel #4
0
    void Awake()
    {
        map = FindObjectOfType <MapLoader>();
        bar = FindObjectOfType <BarManager>();
        collectibleSpawner = FindObjectOfType <CollectibleSpawner>();
        animator           = GetComponent <Animator>();

        sprite = transform.Find("Sprite");

        sprite.gameObject.SetActive(false);

        UpdateCashText();
    }
Beispiel #5
0
    void Awake()
    {
        instance = this;
        map      = FindObjectOfType <MapLoader>();
        levels   = FindObjectOfType <LevelManager>();

        collectibleSpawner = FindObjectOfType <CollectibleSpawner>();
        blockSpawners      = FindObjectsOfType <BlockSpawner>();
        spawnManager       = FindObjectOfType <SpawnManager>();
        playerController   = FindObjectOfType <PlayerController>();
        camCon             = FindObjectOfType <CameraController>();

        bar = FindObjectOfType <BarManager>();
    }
 void Awake()
 {
     collectibleSpawner = GameObject.FindGameObjectWithTag("Spawner").GetComponent <CollectibleSpawner>();
 }
 void Awake()
 {
     Instance = this;
 }
 protected void OnEnable()
 {
     targetPM        = target as CollectibleSpawner;
     handleTransform = targetPM.transform;
 }