Beispiel #1
0
    // Start is called before the first frame update
    void Awake()
    {
        nma = GetComponent <NavMeshAgent>();
        fra = GetComponent <ForceRegionAcceptor>();

        StartIdling();
    }
Beispiel #2
0
    private void OnTriggerStay(Collider collision)
    {
        ForceRegionAcceptor fRA = collision.gameObject.GetComponent <ForceRegionAcceptor>();

        if (!fRA)
        {
            return;
        }

        Rigidbody rb = collision.gameObject.GetComponent <Rigidbody>();

        rb.AddForce(transform.up * force_Strength * fRA.forceRatio);
    }
Beispiel #3
0
    void Start()
    {
        nma = GetComponent <NavMeshAgent>();

        fra = GetComponent <ForceRegionAcceptor>();
    }