Exemplo n.º 1
0
    public Color32 deletionColor; // Not used in this script, but InvItem and GarbageArea use this

    // Every left click does a raycast, if an object with the "InteractiveObject" tag
    // is hit with and its 'draggable' set to true, draggedObject is set to that object and until the mouse is released
    // draggedObject will follow the mouse position

    void Start()
    {
        ParticleSystem particleSystem = dustParticles.GetComponent <ParticleSystem>(); // easier to read

        dustParticleSystemLifetime = particleSystem.main.duration + particleSystem.main.startLifetimeMultiplier;

        adjustObjectsScript = transform.GetComponent <AdjustObjects>();
    }
Exemplo n.º 2
0
    // Since the GameManager doesnt delete itself between scene reloads, we need a function to cache what
    // is needed again, since those objects will be deleted. Basically this is a Start() function more or less
    void Init()
    {
        gameBegan = false;

        collectedCollecibles = 0; // reset score
        invController        = GameObject.FindGameObjectWithTag("InventoryController").GetComponent <InventoryController>();

        GameObject p = GameObject.FindGameObjectWithTag("Player");

        dragScript   = p.GetComponent <Drag>();
        adjustScript = p.GetComponent <AdjustObjects>();
        wireEditor   = p.GetComponent <WireEditor>();
    }