public override void Show(Entity attatched) { Attatched = attatched; _cachedAtkMenu = GameObject.FindGameObjectWithTag("AttackButton").GetComponent <AttackMenu>(); _shown = true; _cachedAtkMenu.Hide(); }
//Функция вызывается при окончании работы загрузчика уровней public bool StartManager() { if (rhythmManager == null) { rhythmManager = RhythmManager.instance; } if (attackMenu == null) { attackMenu = AttackMenu.instance; } if (pauseMenu == null) { pauseMenu = MenuManager.instance; } if (knightHealthbar != null) //Если здороровье включено { healthbar = knightHealthbar.GetComponent <KnightHealth>(); //получить ссылку на скрипт здоровья } if (progress != null) //если прогресс включен { progress_bar = progress.GetComponent <ProgressBar>(); //получить ссылку на скрипт слайдер прогресса } audioSource = gameObject.GetComponent <AudioSource>(); //получить audioSource isLoaded = true; return(isLoaded); }
private void Start() { _successIndicator.color = _originalColor; _shown = false; _targetOpacity = 255f; Attatched = null; _entityRenderer = null; _correctionVector = new Vector3(); GetComponentInChildren <Text>().text = Description; _acceptingInput = true; _animFinished = false; _cachedAttackMenu = GameObject.FindGameObjectWithTag("AttackButton").GetComponent <AttackMenu>(); }
public void AddMissChance() { AttackMenu attackMenu = (AttackMenu)FindObjectOfType(typeof(AttackMenu)); attackMenu.hitChance -= missChance; }
private void IncreaseCombometer() { AttackMenu attackMenu = (AttackMenu)FindObjectOfType(typeof(AttackMenu)); attackMenu.combometerNeededPoints += combometerSize; }
private void AddDamage() { AttackMenu attackMenu = (AttackMenu)FindObjectOfType(typeof(AttackMenu)); attackMenu.swordDamage += additionalDamage; }
void Awake() { S = this; }