public void SpawnPassenger(Vector3 spawnPos)
    {
        Quaternion identity  = Quaternion.get_identity();
        HumanNPC   component = (HumanNPC)((Component)GameManager.server.CreateEntity(this.dismountablePrefab.resourcePath, spawnPos, identity, true)).GetComponent <HumanNPC>();

        component.Spawn();
        component.SetNavMeshEnabled(false);
        this.AttemptMount((BasePlayer)component);
    }
Beispiel #2
0
    public void SpawnPassenger(Vector3 spawnPos)
    {
        Quaternion quaternion = Quaternion.identity;
        HumanNPC   component  = GameManager.server.CreateEntity(this.dismountablePrefab.resourcePath, spawnPos, quaternion, true).GetComponent <HumanNPC>();

        component.Spawn();
        component.SetNavMeshEnabled(false);
        this.AttemptMount(component);
    }