Exemple #1
0
    void Start()
    {
        ttp = GetComponent <TurnTowardPoint> ();
        GameObject ship = GameObject.FindGameObjectWithTag("Player");

        if (ship == null)
        {
            return;
        }
        ttp.SnapTowardPoint(ship.transform.position);
    }
 void Start()
 {
     ttp = GetComponent <TurnTowardPoint> ();
     if (target == null)
     {
         if (GameObject.FindGameObjectWithTag("Player") == null)
         {
             return;
         }
         target = GameObject.FindGameObjectWithTag("Player").transform;
     }
 }