Exemple #1
0
    void Start()
    {
        damButton    = GameObject.Find("Cliff to Dam");
        bubbleScript = GetComponentInChildren <ThoughtBubble> ();
        audSrc       = GetComponent <AudioSource>();
        animator     = GetComponent <Animator>();
        GameObject tissueBox = transform.GetChild(0).gameObject;

        tissueBoxRenderer    = tissueBox.GetComponent <SpriteRenderer>();
        tissueBoxProgression = tissueBox.GetComponent <CliffProgression> ();
        progression          = GameManagerManager.forestProgression;
        if (progression.haveTissueBox())
        {
            animator.SetBool("hasBox", false);
        }
        else
        {
            StartCoroutine(BeginCliffDialog());
            enableSkipButton();
        }

        if (progression.haveBanjo())
        {
            int children = transform.childCount;
            for (int i = 0; i < children; i++)
            {
                Destroy(transform.GetChild(i).gameObject);
            }
            animator.SetBool("hasBanjo", true);
            CliffProgression.canBeginLevel = true;
            StartCoroutine(FinishCliffDialog());
        }
    }
Exemple #2
0
    // Use this for initialization
    void Start()
    {
        if (storyManager == null)
        {
            storyManager = GameManagerManager.forestProgression;
        }
        if (cameraMover == null)
        {
            cameraMover = Camera.main.GetComponent <SwipeCamera> ();
        }
        if (goToBenchBtn == null)
        {
            goToBenchBtn = GameObject.Find("ToWorkshop");
        }
        if (kaPow == null)
        {
            kaPow = GameObject.Find("KAPOW");
        }
        if (dodo == null)
        {
            dodo = GameObject.Find("Dodo").GetComponent <DodoController> ();
        }
        if (buildKite == null)
        {
            buildKite = GameObject.Find("BigThoughtBubble").GetComponent <ThoughtBubble>();
        }

        wiggling = wiggleAround();
    }
Exemple #3
0
    // Use this for initialization
    void Start()
    {
        gameManager = GameManagerManager.manager;
        if (gameManager == null)
        {
            Debug.LogError("Starting workbench without game manager. Can't populate inventory");
        }
        else
        {
            progression = GameManagerManager.forestProgression;

            string[] partsToBuildList = null;

            string partToBuild = GameManagerManager.forestProgression.gizmoToBuild;

            switch (partToBuild)
            {
            case GizmoPrefabs.KITE:
                partsToBuildList = KiteBuilder.PARTS_LIST;
                break;

            case GizmoPrefabs.BANJO:
                partsToBuildList = BanjoBuilder.PARTS_LIST;
                break;

            case GizmoPrefabs.SLINGSHOT:
                partsToBuildList = SlingShotBuilder.PARTS_LIST;
                break;

            default:
                partsToBuildList = new string[0];
                break;
            }
            foreach (string type in partsToBuildList)
            {
                //Get all parts of a type in your inventory
                List <string> partsList = progression.inventory.GetParts(type);
                if (partsList != null)                  //Found parts
                {
                    foreach (string name in progression.inventory.GetParts(type))
                    {
                        //Create the part
                        BuildSlot(name);
                    }
                }
                else                  //Didn't find parts
                {
                    BuildSlot(null);
                }
            }
        }
    }
 // Use this for initialization
 void Awake()
 {
     if (manager == null)
     {
         manager      = GameObject.Find("_GameManager");
         manager      = Instantiate(Resources.Load("_GameManager")) as GameObject;
         manager.name = "_GameManager";
     }
     if (forestProgression == null)
     {
         forestProgression = manager.GetComponent <ForestProgression>();
     }
 }
Exemple #5
0
 // Use this for initialization
 void Start()
 {
     storyManager   = GameManagerManager.forestProgression;
     skipButton     = GameObject.Find("SkipButton");
     savannahButton = GameObject.Find("Airfield to Savannah");
     animator       = this.GetComponent <Animator> ();
     source         = this.GetComponent <AudioSource> ();
     sadDodo        = dodoSadRoutine();
     speechDodo     = dodoSpeechRoutine();
     if (!storyManager.haveMetDodo())
     {
         StartCoroutine(sadDodo);
     }
     else
     {
         //Remove kite bubbles
         Destroy(transform.GetChild(0).gameObject);
     }
 }
Exemple #6
0
 // Use this for initialization
 void Start()
 {
     if (storyManager == null)
     {
         storyManager = GameManagerManager.forestProgression;
     }
     if (cameraMover == null)
     {
         cameraMover = Camera.main.GetComponent <SwipeCamera> ();
     }
     if (kaPow == null)
     {
         kaPow = GameObject.Find("KAPOW");
     }
     if (dodo == null)
     {
         dodo = GameObject.Find("Dodo").GetComponent <DodoDamController> ();
     }
     if (buildSlingshot == null)
     {
         buildSlingshot = GameObject.Find("BigThoughtBubble").GetComponent <ThoughtBubble>();
     }
 }
    // Use this for initialization
    void Start()
    {
        bubbleScript = transform.GetChild(0).GetComponent <ThoughtBubble> ();
        progression  = GameManagerManager.forestProgression;
        audSrc       = GetComponent <AudioSource>();
        animator     = GetComponent <Animator>();

        if (progression.haveSlingshot())
        {
            StartCoroutine(StartOutroDialog());
            int children = transform.childCount;

            for (int i = 0; i < children; i++)
            {
                Destroy(transform.GetChild(i).gameObject);
            }
        }
        else
        {
            enableSkipButton();
            StartCoroutine(StartIntroDialog());
        }
    }
 // Use this for initialization
 void Start()
 {
     storyManager = GameManagerManager.forestProgression;
     toCliff      = GameObject.Find("Savannah to Cliff");
 }