public void onCardToogled(GameData.HeroType type, bool active) { m_playButton.SetActive(active); if (active) { m_cards.ForEach(x => { if (x.type != type) { x.setActive(false); } }); m_gameDataProxy.heroType = type; } }
public void initialize(Vector2 position, int team, GameData.HeroType type, bool isPlayer = false) { m_type = type; m_team = team; transform.position = new Vector3(position.x, 0.0f, position.y); initialize(new CharacterData(CharacterConfigDBHelper.getHeroConfig(type, 1))); var gameController = FindObjectOfType <GameController>(); this.OnDeath += gameController.onPlayerDeath; updateVisual(); if (isPlayer) { gameObject.AddComponent <Player>(); } }
public static HeroConfig getHeroConfig(GameData.HeroType type, int level) { return(DBProvider.instance <I_UserDBProvider>().getHeroConfig(type.ToString(), level)); }