// Use this for initialization
    void Start()
    {
        dc       = GameObject.Find("GameObject_cursor").GetComponent <Detect_click> ();
        crossbow = GameObject.Find("Crossbow").GetComponent <UpdateCursor_crossbow_button> ();



        help_eraser_flash = GameObject.Find("help_eraser_flash");
        help_eraser_flash.SetActive(false);
    }
示例#2
0
    // Use this for initialization
    void Start()
    {
        // objects to be placed

        object_lever  = GameObject.Find("lever_placed");
        object_ramp   = GameObject.Find("ramp_placed");
        object_wedge  = GameObject.Find("Wedge_placed");
        object_pulley = GameObject.Find("pulley_placed");

        // scripts attached to inventories:
        lever        = GameObject.Find("Lever").GetComponent <UpdateCursor_lever_button> ();
        ramp         = GameObject.Find("Ramp").GetComponent <UpdateCursor_ramp_button> ();
        wedge        = GameObject.Find("Wedge").GetComponent <UpdateCursor_wedge_button> ();
        eraser       = GameObject.Find("Eraser").GetComponent <UpdateCursor_eraser_button> ();
        crossbow     = GameObject.Find("Crossbow").GetComponent <UpdateCursor_crossbow_button> ();
        plank        = GameObject.Find("PlankSprite").GetComponent <WedgePlank> ();
        pulleyplank1 = GameObject.Find("PlankRight").GetComponent <plankz1> ();
        pulleyplank2 = GameObject.Find("PlankLeft").GetComponent <plankz2> ();
        shoot        = GameObject.Find("Gun Location").GetComponent <ShootDirection> ();
        pulley       = GameObject.Find("Pulley").GetComponent <UpdateCursor_pulley_button> ();

        // cursor:
        cursor = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <HandleCursor> ();

        pprightPos = pulleyplank1.transform.position;
        ppleftPos  = pulleyplank2.transform.position;

        // help box:
        panel_rotate = GameObject.Find("help_rotate");
        panel_rotate.SetActive(false);
        // 1: has soft reset; 0: new game
        softreset = PlayerPrefs.GetInt("reset");

        // animator:
        animator = GameObject.Find("Billie").GetComponent <Animator>();
    }
示例#3
0
 // Use this for initialization
 void Start()
 {
     crossbow = GameObject.Find("Crossbow").GetComponent <UpdateCursor_crossbow_button> ();
     animator = GameObject.Find("Billie").GetComponent <Animator>();
 }