コード例 #1
0
 /// <summary>
 /// Constructs a new WWObjectData instance with the provided data.
 /// </summary>
 /// <param name="id">The unique id.</param>
 /// <param name="wwTransform">The WWTransform.</param>
 /// <param name="parent">The parent WWObjectData. Can be null</param>
 /// <param name="children">The list of children this WWObjectData is a parent of.</param>
 /// <param name="resourceTag">The resource tag</param>
 public WWObjectData(Guid id, WWTransform wwTransform,
                     WWObjectData parent, List <WWObjectData> children, string resourceTag)
 {
     this.id          = id;
     this.wwTransform = wwTransform;
     this.parent      = parent;
     this.children    = children;
     this.resourceTag = resourceTag;
 }
コード例 #2
0
 /// <summary>
 /// Constructs a new WWObject data from a JSON blobl, presumably from a file.
 /// </summary>
 /// <param name="b"> the JSON blob</param>
 public WWObjectData(WWObjectJSONBlob b)
 {
     id          = b.id;
     wwTransform = new WWTransform(b.wwTransform);
     resourceTag = b.resourceTag;
     // Note parent and children relationships are re-linked in the SceneGraphController
     // during the Load Operation
     parent   = null;
     children = new List <WWObjectData>();
 }
コード例 #3
0
ファイル: WWObject.cs プロジェクト: nhcarter123/WorldWizards
 /// <summary>
 /// Set the WWTransform of this WWObject and the gameObject transform
 /// </summary>
 /// <param name="wwTransform">The wwTransform to set</param>
 public void SetTransform(WWTransform wwTransform)
 {
     SetPosition(wwTransform.coordinate);
     SetRotation(wwTransform.rotation);
 }