public SavedCharacter(Character chara) { Character tempChara = ObjectCopier.Clone <Character>(chara); this.Name = chara._Name; this.isUnique = tempChara.isunique; this.id = tempChara.id; this.SavedStats = tempChara.stats; this.SavedInventory = tempChara.inventroy; }
public Character Clone(bool unique) { // Debug.Log("Character cloned"); Character newChara = ObjectCopier.Clone <Character>(this); if (!spawned) { newChara.SpawnDirection = this.SpawnDirection; } else { newChara.SpawnDirection = (GameGrid.BlockDirections.FaceDirections) this.Faceddirection; } return(newChara); }
public SavedCharacterGamePlay(Character chara) { Character newchara = ObjectCopier.Clone <Character>(chara); this.Name = chara._Name; this.isUnique = chara.isunique; this.id = chara.id; this.SavedStats = chara.stats; this.currentHp = this.SavedStats.CurrentHP; this.currentMP = this.SavedStats.CurrentMP; this.SavedInventory = chara.inventroy; this.isSpawned = chara.isSpawned; this.SpawnDirection = chara.Faceddirection - 1; this.TurnActionsPreformed = chara.TurnActionsPreformed; this.onStartPath = chara.onStartPath; this.currentPosition = chara.getGridPosition().Clone(); }
public Gear Clone() { Gear newGear = ObjectCopier.Clone <Gear>(this); return(newGear); }