Example #1
0
 // Use this for initialization
 void Start()
 {
     Total         = transform.childCount;
     Player        = GameObject.Find("Player").transform;
     playercontrol = GameObject.Find("Player").GetComponent <Playercontrol>();
     key.SetActive(false);
 }
Example #2
0
 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> ();
 }
Example #6
0
    // Use this for initialization
    void Start()
    {
        Player = FindObjectOfType <Playercontrol>();

        isFollowing = true;
    }