private void Start() { util = GetComponent <Util>(); charInfo = GetComponent <CharInfo>(); charUI = GetComponent <CharUI>(); canAttack = false; cooldownAttack = charInfo.cAttackSpeed; }
//Base Methods private void Awake() { _charUI = Instantiate <CharUI>(PrefabProvider_Battle.instance.CharUIPrefab, transform, false); _charEffects = Instantiate <CharacterEffects>(PrefabProvider_Battle.instance.CharEffectsPrefab, transform, false); _charEffects.Init(moniker); _charSpellEffect = GetComponent <SpellEffect>(); _movement = GetComponent <Movement>(); _jump = GetComponent <Jump>(); _audioManager = AudioManager.instance; _extraVisualLogic = GetComponent <IExtraVisualLogic>(); }
public override void ModifyInterfaceLayers(List <GameInterfaceLayer> layers) { int MouseTextIndex = layers.FindIndex(layer => layer.Name.Equals("Vanilla: Mouse Text")); if (MouseTextIndex != -1) { layers.Insert(MouseTextIndex, new LegacyGameInterfaceLayer( "VapeRPG: StatHelp", delegate { if (StatHelpUIState.visible) { StatHelpUI.Draw(Main.spriteBatch); } return(true); }, InterfaceScaleType.UI) ); layers.Insert(MouseTextIndex, new LegacyGameInterfaceLayer( "VapeRPG: StatWindow", delegate { if (CharUIState.visible) { charUserInterface.Update(Main._drawInterfaceGameTime); CharUI.Draw(Main.spriteBatch); } return(true); }, InterfaceScaleType.UI) ); layers.Insert(MouseTextIndex, new LegacyGameInterfaceLayer( "VapeRPG: ExperienceBar", delegate { if (ExpUIState.visible) { expUserInterface.Update(Main._drawInterfaceGameTime); ExpUI.Draw(Main.spriteBatch); } return(true); }, InterfaceScaleType.UI) ); } }