Exemplo n.º 1
0
    // ------------------------------------------------------------------------

    void Awake()
    {
        gameCamera       = GameObject.Find("GameCam");
        cameraController = GameObject.Find("Controller").GetComponent <CameraController>();
        gui        = GameObject.Find("Controller").GetComponent <GUINotification>();
        sceneFader = SceneFader.create();
        sceneFader.startScene();
    }
Exemplo n.º 2
0
    // ------------------------------------------------------------------------
    // Private methods for building the level
    // ------------------------------------------------------------------------

    private void showLevelInformation()
    {
        GUINotification gui = GameObject.Find("Controller").GetComponent <GUINotification>();

        gui.clearNotifications();
        gui.notify(Title, 2f);

        string spiders = "";

        if (objGrabber)
        {
            spiders = "Grabber";
            if (objZapper && objPusher)
            {
                spiders += ", ";
            }
            else if (objZapper || objPusher)
            {
                spiders += " and ";
            }
        }
        if (objPusher)
        {
            spiders += "Pusher";
            if (objZapper)
            {
                spiders += " and ";
            }
        }
        if (objZapper)
        {
            spiders += "Zapper";
        }

        gui.notify("Available spiders:\n" + spiders, 2f);

        string goal = "";

        if (Klondikes > 0)
        {
            goal = "Collect " + Klondikes + " Klondike" + (Klondikes > 1 ? "s" : "");
            if (Robots > 0)
            {
                goal += " and destroy " + Robots + " robot" + (Robots > 1 ? "s" : "");
            }
        }
        else if (Robots > 0)
        {
            goal += "Destroy " + Robots + " robot" + (Robots > 1 ? "s" : "");
        }
        if (Timelimit > 0)
        {
            goal += " within " + gameObject.GetComponent <Conditions>().getRemainingTime() + " minutes";
        }
        gui.notify(goal, 2f);
    }
Exemplo n.º 3
0
    // ------------------------------------------------------------------------

    void Start()
    {
        gui = gameObject.GetComponent <GUINotification>();
    }