예제 #1
0
    override public void SetAgentDestination(Vector3 destination)
    {
        if (spawnComponent == null)
        {
            spawnComponent = GetComponent <SpawnComponent>();

            if (spawnComponent == null)
            {
                SpawnComponentTutorial = GetComponent <SpawnComponentTutorial>();
                if (SpawnComponentTutorial == null)
                {
                    Debug.LogError("StaticSpawnerMoveComponent error: No spawnComponent found");
                    return;
                }
            }
        }

        if (spawnComponent != null)
        {
            spawnComponent.waypointLocation.position = destination;
        }
        else
        {
            SpawnComponentTutorial.waypointLocation.position = destination;
        }
    }
예제 #2
0
    public SpawnQueueItemTutorial(Image image, Text text, MyObject myObject, SpawnComponentTutorial spawnComponent, Text costText)
    {
        UICooldownImage     = image;
        queueLength         = text;
        thingToSpawn        = myObject;
        this.spawnComponent = spawnComponent;
        this.costText       = costText;
        nrOfQueue           = 0;
        gameManager         = GameObject.FindObjectOfType <GameManager>();

        TutorialInputManager2 = GameObject.FindObjectOfType <TutorialInputManager2>();

        image.GetComponentInParent <SpawnUIButtonScript>().SpawnQueueItemTutorial = this;
    }