public System.Collections.Generic.List <byte> __encode() { var data = new System.Collections.Generic.List <byte>(); if (this.groupInfo == null) { this.groupInfo = new SceneGroupInfo(); } data.AddRange(this.groupInfo.__encode()); return(data); }
protected GameObject InstantiateNext(Vector3 nextPosition) { var instanceInfo = this._sceneGroupInstanceInfo; if (instanceInfo.remainingInstanceCount == 0) { instanceInfo = this.GetNextSceneGroupInstanceInfo(); // HACK: for now let's make sure we have a proper SceneGroupInfo, but also not forever var count = 0; SceneGroupInfo test = instanceInfo.group; while (!test.sceneGroup && count < 10) { instanceInfo = this.GetNextSceneGroupInstanceInfo(); count++; } } // Regardless of fail we're going to decrement, especially if there is a failing with this SceneGroup specifically instanceInfo.remainingInstanceCount -= 1; SceneGroupInfo current = instanceInfo.group; if (!current.sceneGroup) { Debug.LogWarning("Current SceneGroupInfo " + current + " has no scene group, unable to InstantiateNext", this); return(null); } // TODO: test current GameObject originalInstance = current.sceneGroup.GetNextScene(); GameObject result = GameObject.Instantiate( originalInstance, nextPosition, originalInstance.transform.rotation, this.transform); this.SpawnInterests(result.GetComponent <SpawnInterestsInside>()); this._sceneGroupInstanceInfo = instanceInfo; return(result); }
public int __decode(byte[] binData, ref int pos) { this.groupInfo = new SceneGroupInfo(); this.groupInfo.__decode(binData, ref pos); return(pos); }
public SceneGroupInfoNotice(SceneGroupInfo groupInfo) { this.groupInfo = groupInfo; }
public SceneGroupInfoNotice() { groupInfo = new SceneGroupInfo(); }