コード例 #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();
    }
コード例 #2
0
 public CenteredBox(PosRot posRot, Vector3 extents)
 {
     this.transform = new UFTransform(posRot);
     this.extents   = extents;
 }
コード例 #3
0
 public UFTransform(Vector3 pos, int id)
 {
     this.posRot = new PosRot(pos);
     this.id     = id;
 }
コード例 #4
0
 public UFTransform(Vector3 pos, Quaternion rot, int id)
 {
     this.posRot = new PosRot(pos, rot);
     this.id     = id;
 }
コード例 #5
0
 public UFTransform(PosRot posRot, int id)
 {
     this.posRot = posRot;
     this.id     = id;
 }
コード例 #6
0
 public UFTransform(PosRot posRot) : this(posRot, -1)
 {
 }