Ejemplo n.º 1
0
    // Use this for initialization
    void Start()
    {
        velocity = Vector2.zero;

        if (isTargetAlive())
        {
            typeFollow = TypeFollow.OBJECT;
            following  = true;
            invokeOnFollow();
        }
    }
Ejemplo n.º 2
0
 /// <summary>
 /// Sets the target to follow.
 /// </summary>
 /// <param name="target"></param>
 public void setTarget(GameObject target, bool follow = false)
 {
     this.target     = target;
     this.typeFollow = TypeFollow.OBJECT;
     this.following  = follow;
 }