public void ChangeSceneGamePlay() { gamePlayerGoodsInfo = ShopManager.Instance.GetSelectedPlayerInfo(); LoadSceneManager.LoadScene(LoadSceneManager.sceneNames.gamePlay, playerSprites); AdManager.Instance.GameStartAndStopCoroutine(); //SceneManager.LoadScene("GamePlay", LoadSceneMode.Single); }
public void SetPlaySettings() { player = GameObject.FindGameObjectWithTag("Player").GetComponent <ControllerPlayer>(); if (MainManager.Instance != null) { playerInfo = MainManager.Instance.GetPlayerInfo(); player.SetPlayerInfo(playerInfo.shieldDuration, MainManager.Instance.GetPlayerSprite(), playerInfo.itemSlot, playerInfo.lifeTime); } else { Sprite mySpr = Sprite.Create(Texture2D.whiteTexture, new Rect(Vector2.zero, new Vector2(1, 1)), Vector2.zero); Sprite[] spr = { mySpr, mySpr, mySpr }; playerInfo = new ShopManager.ItemInfo(); playerInfo.lifeTime = 600; player.SetPlayerInfo(playerInfo.shieldDuration, spr, playerInfo.itemSlot, playerInfo.lifeTime); } }
public void ChangePlayer(Sprite[] sprites, ShopManager.ItemInfo itemInfo) { gamePlayerGoodsInfo = itemInfo; playerSprites = sprites; player.SetSprites(sprites); }