private void CreateHandlers(IModel shape) { if (LastShape != null) { LastShape.RemoveHandle(); } HandleCursor cursor = new HandleCursor(); HandlePencil pencil = new HandlePencil(); HandleLine line = new HandleLine(); HandleEllipse ellipse = new HandleEllipse(); HandleRectangle rectangle = new HandleRectangle(); HandleBezier bezier = new HandleBezier(); HandleFill fill = new HandleFill(); HandleImage image = new HandleImage(); cursor.Successor = pencil; pencil.Successor = line; line.Successor = ellipse; ellipse.Successor = rectangle; rectangle.Successor = bezier; bezier.Successor = fill; fill.Successor = image; cursor.Handle(shape); }
// Start is called when a script is enabled. If you need to make sure something is initialized // put it in awake. // void Start() { footsound = GameObject.Find("Billie").GetComponent <AudioSource> (); envtsounds = GameObject.Find("Environmental Sound"); deathSound = GameObject.Find("DeathSound").GetComponent <DeathSound> (); cursor = GameObject.Find("Main Camera").GetComponent <HandleCursor> (); Time.timeScale = 1; gameoverObjects = GameObject.FindGameObjectsWithTag("ShowOnGameOver"); menuObjects = GameObject.FindGameObjectsWithTag("MenuButton"); hidegameover(); }
void Start() { cursor = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <HandleCursor> (); dc = GameObject.Find("GameObject_cursor").GetComponent <Detect_click> (); l9 = GameObject.Find("CheckpointFlag9").GetComponent <lvl9> (); lb = GameObject.Find("GUI").GetComponent <LeaderboardTestGUI> (); //sound = GameObject.Find ("Environmental Sound"); footsound = GameObject.Find("Billie").GetComponent <AudioSource> (); Time.timeScale = 1; starObjects = GameObject.FindGameObjectsWithTag("lvl10"); txt = GameObject.Find("score_text10").GetComponent <Text>(); hidestars(); }
void Start() { menuObjects = GameObject.FindGameObjectsWithTag("MenuButton"); block7 = GameObject.Find("blocker7"); block7.SetActive(false); cursor = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <HandleCursor> (); dc = GameObject.Find("GameObject_cursor").GetComponent <Detect_click> (); l6 = GameObject.Find("CheckpointFlag6").GetComponent <lvl6> (); lb = GameObject.Find("GUI").GetComponent <LeaderboardTestGUI> (); //sound = GameObject.Find ("Environmental Sound"); footsound = GameObject.Find("Billie").GetComponent <AudioSource> (); Time.timeScale = 1; starObjects = GameObject.FindGameObjectsWithTag("lvl7"); txt = GameObject.Find("score_text7").GetComponent <Text>(); hidestars(); }
void Start() { menuObjects = GameObject.FindGameObjectsWithTag("MenuButton"); block2 = GameObject.Find("blocker2"); block2.SetActive(false); //blocker surrounding level 2 is innitially inactive cursor = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <HandleCursor> (); dc = GameObject.Find("GameObject_cursor").GetComponent <Detect_click> (); l1 = GameObject.Find("CheckpointFlag1").GetComponent <lvl1>(); lb = GameObject.Find("GUI").GetComponent <LeaderboardTestGUI> (); //sound = GameObject.Find ("Environmental Sound"); footsound = GameObject.Find("Billie").GetComponent <AudioSource> (); Time.timeScale = 1; starObjects = GameObject.FindGameObjectsWithTag("lvl2"); txt = GameObject.Find("score_text2").GetComponent <Text>(); hidestars(); //initially hide the end of level pop up with stars }
// 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>(); }
// Use this for initialization void Start() { // cursor: cursor = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <HandleCursor> (); dc = GameObject.Find("GameObject_cursor").GetComponent <Detect_click> (); }
void Start() { cursor = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <HandleCursor>(); cursor.setMouse(); }
// Use this for initialization void Start() { clickedSilueta = false; cursor = GameObject.FindGameObjectWithTag("MainCamera").GetComponent<HandleCursor>(); }
// Use this for initialization void Start() { cursor = GameObject.FindGameObjectWithTag("MainCamera").GetComponent<HandleCursor>(); }
// Use this for initialization void Start() { cursor = gameObject.transform.GetComponent <HandleCursor> (); }