public virtual void Save(GameDataWriter writer) { // Write the position, rotation and scale to file writer.Write(transform.localPosition); writer.Write(transform.localRotation); writer.Write(transform.localScale); }
/// <summary> /// 存储当前物体 /// </summary> public virtual void Save(GameDataWriter writer) { // 存储当前物体位置、旋转和缩放 writer.Write(transform.localPosition); writer.Write(transform.localRotation); writer.Write(transform.localScale); }
public virtual void Save(GameDataWriter writer) { //Transform writer.Write(transform.localPosition); writer.Write(transform.localRotation); //Thank You Polymorphism writer.Write(transform.localScale); }
//PersistableObject public override void Save(GameDataWriter writer) { writer.Write(currentShipPrefab); writer.Write(coins); writer.Write(missilesCollapsed); writer.Write(topScore); }
// Virtual so it can be overridden // Writes data into writer from transform public virtual void Save(GameDataWriter writer) { writer.Write(transform.localPosition); writer.Write(transform.localRotation); writer.Write(transform.localScale); writer.Write(meshRenderer.material.color); }
public override void Save(GameDataWriter writer) { writer.Write(frequency); writer.Write(cosOffset); writer.Write(sinOffset); writer.Write(previousPosition); }
void Save() { var cubeBinaryWriter = new BinaryWriter(File.Open(saveCubeDataPath, FileMode.Create)); var spherBinaryeWriter = new BinaryWriter(File.Open(saveSphereDataPath, FileMode.Create)); GameDataWriter cubeDataWriter = new GameDataWriter(cubeBinaryWriter); GameDataWriter sphereDataWriter = new GameDataWriter(spherBinaryeWriter); cubeDataWriter.Write(iterableCubeObject.Length); for (int i = 0; i < iterableCubeObject.Length; i++) { cubeDataWriter.Write(iterableCubeObject[i].transform.localPosition); cubeDataWriter.Write(iterableCubeObject[i].transform.localRotation); cubeDataWriter.Write(iterableCubeObject[i].transform.localScale); } sphereDataWriter.Write(iterableSphereObject.Length); for (int i = 0; i < iterableSphereObject.Length; i++) { sphereDataWriter.Write(iterableSphereObject[i].transform.localPosition); sphereDataWriter.Write(iterableSphereObject[i].transform.localRotation); sphereDataWriter.Write(iterableSphereObject[i].transform.localScale); } }
public override void Save(GameDataWriter writer) { //AddTopScore(new Score(playerName, score)); writer.Write(score); writer.Write(playerName); }
public void Save(GameDataWriter writer) { writer.Write(State.number); writer.Write(State.isChecked ? 1 : 0); writer.Write(State.coordinates.x); writer.Write(State.coordinates.y); }
public override void Save(GameDataWriter writer) { base.Save(writer); writer.Write(color); writer.Write(AngularVelocity); writer.Write(Velocity); }
public virtual void Save(GameDataWriter writer) { writer.Write(this.cloudid); writer.Write(this.type); writer.Write(this.localPosition); writer.Write(this.localRotation); writer.Write(this.localScale); }
public override void Save(GameDataWriter writer) { writer.Write(focalShape); //focal shape의 saveindex를 저장 writer.Write(frequency); writer.Write(cosOffset); writer.Write(sinOffset); writer.Write(previousPosition); }
public override void Save(GameDataWriter writer) { writer.Write(equippedWeaponIndex); string ids = String.Join(",", characterItems.ToArray()); writer.Write(ids); }
public void SaveHighScores(GameDataWriter writer) { writer.Write(topScores.Count); foreach (var score in topScores) { writer.Write(score); } }
public override void Save(GameDataWriter writer) { writer.Write(focalShape); //write focalShape's index in Game's shapes List writer.Write(frequency); writer.Write(cosOffset); writer.Write(sinOffset); writer.Write(previousPosition); }
public override void Save(GameDataWriter writer) { writer.Write(_focalShape); writer.Write(_frequency); writer.Write(_cosOffset); writer.Write(_sinOffset); writer.Write(_previousPosition); }
//Method used to save objects public virtual void Save(GameDataWriter writer) { //Write the localpositon as Vector 3 writer.Write(transform.localPosition); //Write the localrotation as Quarternion writer.Write(transform.localRotation); //Write the localscale as Vector3 writer.Write(transform.localScale); }
public override void Save(GameDataWriter writer) { base.Save(writer); writer.Write(stats.CurrentHealth); writer.Write(currentAmmo); writer.Write(lastAttack); writer.Write(movePoint); writer.Write(gameObject.activeSelf); }
public override void Save(GameDataWriter writer) { writer.Write(shapes.Count); for (int i = 0; i < shapes.Count; i++) { writer.Write(shapes[i].ShapeId); writer.Write(shapes[i].MaterialId); shapes[i].Save(writer); } }
public void Save(GameDataWriter writer) { writer.Write(_lastLoadedLevel); writer.Write(_lastLoadedLevelStage); writer.Write(_cometsCount); for (int i = 0; i < _cometsCount; i++) { writer.Write(_cometCatchFlags[i]); } }
public override void Save(GameDataWriter writer) { writer.Write(shapes.Count); writer.Write(loadingLevelBuildIndex); for (int i = 0; i < shapes.Count; i++) { writer.Write(shapes[i].ShapeId); shapes[i].Save(writer); } }
public override void Save(GameDataWriter writer) { writer.Write(-saveVersion); writer.Write(m_Objects.Count); for (int i = 0; i < m_Objects.Count; i++) { m_Objects[i].Save(writer); } }
public override void Save(GameDataWriter writer) { writer.Write(type); writer.Write(_propsList.Count); for (int i = 0; i < _propsList.Count; i++) { writer.Write(_propsList[i]); } }
public override void Save(GameDataWriter writer) { //writer.Write(-saveVersion); writer.Write(shapes.Count); for (int i = 0; i < shapes.Count; ++i) { writer.Write(shapes[i].ShapeId); writer.Write(shapes[i].MaterialId); shapes[i].Save(writer); } }
public override void Save(GameDataWriter writer) { //writer.Write(-saveVersion); //now in persistentStorage.Save() //write version negative, so it can be checked against older versions that didnt have a version writer.Write(shapes.Count); for (int i = 0; i < shapes.Count; i++) { writer.Write(shapes[i].ShapeId); writer.Write(shapes[i].MaterialId); shapes[i].Save(writer); } }
public override void Save(GameDataWriter writer) { writer.Write(shapes.Count); writer.Write(loadLevelBuildIdx); for (int i = 0; i < shapes.Count; ++i) { writer.Write(shapes[i].ShapeId); writer.Write(shapes[i].MaterialId); shapes[i].Save(writer); } }
public void Save(GameDataWriter writer) { writer.Write(_currentStarsCount); _scenario.Save(writer); writer.Write(_levelObjects.Length); foreach (var levelObject in _levelObjects) { levelObject.Save(writer); } }
public override void Save(GameDataWriter writer) { base.Save(writer); writer.Write(colors.Length); for (int i = 0; i < colors.Length; i++) { writer.Write(colors[i]); } writer.Write(AngularVelocity); writer.Write(Velocity); }
public override void Save(GameDataWriter writer) { writer.Write(_shapes.Count); writer.Write(_loadedLevelIndex); for (int i = 0; i < _shapes.Count; i++) { writer.Write(_shapes[i].ShapeId); writer.Write(_shapes[i].MaterialId); _shapes[i].Save(writer); } }
public override void Save(GameDataWriter writer) { writer.Write(saveVersion); writer.Write(shapes.Count); for (int i = 0; i < shapes.Count; i++) { //Debug.Log("writing : " + shapes[i].ShapeId); writer.Write(shapes[i].ShapeId); writer.Write(shapes[i].MaterialId); shapes[i].Save(writer); } }