예제 #1
0
            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;
            }
예제 #2
0
        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);
        }
예제 #3
0
            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();
            }
예제 #4
0
        public Gear Clone()
        {
            Gear newGear = ObjectCopier.Clone <Gear>(this);

            return(newGear);
        }