private void updateHeroData(HUDData hudData) { currentHeroData = hudData; selectedHeroText.text = currentHeroData.name; this.charImg.sprite = hudData.charImg; refreshHUDValues (); updateButtons (); checkTeamHighlight (); }
/* ============================================================================ Init functions ============================================================================ */ public void Init() { // first init languages languages = new LanguageData(); statusValues = new StatusValueData(); elements = new ElementData(); races = new RaceData(); sizes = new SizeData(); areaNames = new AreaNameData(); armors = new ArmorData(); cameraPositions = new CameraPositionData(); attacks = new BaseAttackData(); characters = new CharacterData(); classes = new ClassData(); colors = new ColorData(); dialoguePositions = new DialoguePositionData(); battleAIs = new BattleAIData(); enemies = new EnemyData(); equipParts = new EquipmentPartData(); formulas = new FormulaData(); gameSettings = new GameSettingsData(); items = new ItemData(); itemTypes = new ItemTypeData(); loadSaveHUD = new LoadSaveHUDData(); mainMenu = new MainMenuData(); skillTypes = new SkillTypeData(); effects = new StatusEffectData(); skills = new SkillData(); weapons = new WeaponData(); music = new MusicData(); huds = new HUDData(); recipes = new ItemRecipeData(); fonts = new FontData(); globalEvents = new GlobalEventData(); teleports = new TeleportData(); difficulties = new DifficultyData(); // battle system battleAnimations = new BattleAnimationData(); battleSystem = new BattleSystemData(); }
private void Awake() { staticInstance = this; }
//--------------------------------------------------End of Hero stats public override void Initialize() { base.Initialize (); //Getting map coordinates based on position this.x = Mathf.FloorToInt(this.transform.position.x); this.y = Mathf.FloorToInt(this.transform.position.y); GameObject teamHighlight = null; if (this.team == Teams.Blue) teamHighlight = (GameObject)Instantiate (Resources.Load ("UI/BlueTeamHighlight"), this.transform.position, Quaternion.identity); if (this.team == Teams.Red) teamHighlight = (GameObject)Instantiate (Resources.Load ("UI/RedTeamHighlight"), this.transform.position, Quaternion.identity); if (teamHighlight) { teamHighlight.name = "TeamHighlight"; teamHighlight.transform.parent = this.transform; } //HUD STUFF charImg = Resources.Load<Sprite>("Heroes/" + gameObject.name + "/char"); hudData = new HUDData (gameObject.name, team); updateHUDData (); }