Example #1
0
    public static void Follow()
    {
        MoveTowards move = GameObject.FindGameObjectWithTag("Steersman").GetComponent <MoveTowards>();

        move.target  = GameManager.GetPlayerComponent <STransform>();
        move.enabled = true;
        move.GetComponent <Rigidbody>().isKinematic = false;
    }
Example #2
0
    public static void Stay()
    {
        MoveTowards move = FindGameObjectWithTag("Steersman").GetComponent <MoveTowards>();

        move.target  = null;
        move.enabled = false;
        move.GetComponent <Rigidbody>().isKinematic = true;
    }