Exemple #1
0
    // Use this for initialization
    void Start()
    {
        LoadMap();

        BSPEntity spawnEnt = map.entities.FirstOrDefault(ent => ent.KeyValues["classname"] == "info_player_start");

        Camera.position = spawnEnt.GetVector3("origin");
    }
Exemple #2
0
    public void Init(BSPEntity ent)
    {
        this.Ent = ent;

        transform.position    = ent.GetVector3("origin");
        transform.eulerAngles = new Vector3(transform.eulerAngles.x, ent.GetInt("angle"), transform.eulerAngles.z);

        mdl = new MDL(mdlFiles[ent.KeyValues["classname"]]);
        mdl.go.transform.SetParent(transform);
        mdl.go.transform.localPosition = Vector3.zero;
    }