// Use this for initialization void Start() { Total = transform.childCount; Player = GameObject.Find("Player").transform; playercontrol = GameObject.Find("Player").GetComponent <Playercontrol>(); key.SetActive(false); }
void Update() { if (dir != Vector2.zero) { transform.Translate((Vector2.up + dir) * 2 * Time.deltaTime); player = GameObject.FindWithTag("player").GetComponent <Playercontrol>(); } }
// Use this for initialization void Start() { thePlayer = FindObjectOfType <Playercontrol>(); if (thePlayer.startPoint == pointName) { thePlayer.transform.position = transform.position; thePlayer2 = FindObjectOfType <Player2control> (); thePlayer2.transform.position = transform.position; theCamera = FindObjectOfType <CameraControl> (); theCamera.transform.position = new Vector3(transform.position.x, transform.position.y, theCamera.transform.position.z); } }
private void Awake() { instanse = this; }
// Use this for initialization void Start() { thePlayer = FindObjectOfType <Playercontrol> (); }
// Use this for initialization void Start() { Player = FindObjectOfType <Playercontrol>(); isFollowing = true; }