예제 #1
0
        public void Load()
        {
            PlayerController controller = GameManager.Player;
            PlayerInventory  inventory  = controller.inventory;
            Alive            alive      = controller.alive;

            GameManager.Player.gameObject.transform.position = this.PlayerPosition;

            inventory.SetGold(this.PlayerGold, ShopCoin.Gold);
            inventory.SetGold(this.PlayerSecret, ShopCoin.Secret);

            if (ActiveItem.itemObj != null)
            {
                inventory.EquipItem(this.ActiveItem);
            }

            if (PassiveItem.itemObj != null)
            {
                inventory.EquipItem(this.PassiveItem);
            }

            if (WeaponItem.itemObj != null)
            {
                inventory.EquipItem(this.WeaponItem);
            }

            inventory.OverrideInventory(this.Items);

            controller.canDash     = this.CanDash;
            controller.canTeleport = this.CanTeleport;
            controller.canExplode  = this.CanExplode;
            controller.canWallJump = this.CanWalljump;

            alive.OverrideHealth(this.Health);
        }