Example #1
0
    public virtual void Spawn()
    {
        UFLevelStructure.PosRot pr = default(UFLevelStructure.PosRot);
        if (UFLevel.playerInfo != null)
        {
            pr = UFLevel.playerInfo.GetSpawn(UFPlayerInfo.PlayerClass.Free);
        }

        this.gameObject.layer = UFLevel.playerInfo.playerLayer;

        this.transform.position = pr.position;
        this.transform.rotation = Quaternion.Euler(0f, pr.rotation.eulerAngles.y, 0f);
        SetRotation(pr.rotation);

        GetComponent <UFPlayerWeapons>().Reset();
    }
Example #2
0
 public CenteredBox(PosRot posRot, Vector3 extents)
 {
     this.transform = new UFTransform(posRot);
     this.extents   = extents;
 }
Example #3
0
 public UFTransform(Vector3 pos, int id)
 {
     this.posRot = new PosRot(pos);
     this.id     = id;
 }
Example #4
0
 public UFTransform(Vector3 pos, Quaternion rot, int id)
 {
     this.posRot = new PosRot(pos, rot);
     this.id     = id;
 }
Example #5
0
 public UFTransform(PosRot posRot, int id)
 {
     this.posRot = posRot;
     this.id     = id;
 }
Example #6
0
 public UFTransform(PosRot posRot) : this(posRot, -1)
 {
 }