Esempio n. 1
0
    public void RpcLoadPrefab_INDEPENDENT(PREFAB_ID id, GameData.TEAM team)
    {
        var t = PrefabBank.SPAWN(id, team);

        if (t == null)
        {
            return;
        }
        //t.transform.parent = this.transform;
        t.transform.position = this.transform.position;
        t.transform.rotation = this.transform.rotation;
    }
Esempio n. 2
0
    public void RpcLoadPrefab_Separate(PREFAB_ID id, GameData.TEAM team, Vector3 pos, Vector3 dirLook)
    {
        var t = PrefabBank.SPAWN(id, team);

        if (t == null)
        {
            return;
        }
        //t.transform.parent = this.transform;
        t.transform.position = pos;
        t.transform.LookAt(pos + dirLook);
        //t.transform.rotation = this.transform.rotation;
    }