void Start() { UIFader.SetColor(FadeImage.color); if (startFadeOut) { StartCoroutine(UIFader.FadeOut(FadeSpeed)); } }
void Start() { inputManager = scriptManager.GetScript <InputController>(); gameManager = scriptManager.GetScript <HFPS_GameManager>(); inventory = scriptManager.GetScript <Inventory>(); switcherID = switcher.GetIDByObject(gameObject); BatterySpriteUI = gameManager.BatteryRemaining; BatterySprite = BatterySpriteUI.GetComponent <Image>(); UIFader.SetColor(BatterySprite.color); AnimationComp[DrawAnim].speed = DrawSpeed; AnimationComp[HideAnim].speed = HideSpeed; AnimationComp[ReloadAnim].speed = ReloadSpeed; defaultLightPercentagle = batteryPercentage; }
void Start() { inputControl = scriptManager.GetScript <InputController>(); Inventory = scriptManager.GetScript <Inventory>(); OilSprite = scriptManager.GetScript <HFPS_GameManager>().OilRemaining.GetComponent <Image>(); switcherID = switcher.GetIDByObject(gameObject); UIFader.SetColor(OilSprite.color); anim[DrawAnim].speed = DrawSpeed; anim[HideAnim].speed = HideSpeed; anim[ReloadAnim].speed = ReloadSpeed; defaultOilPercentagle = oilPercentage; fullIntnesity = LanternLight.intensity; oldIntensity = LanternLight.intensity; reduceIntensity = LanternLight.intensity; FlameTint = LanternLight.transform.GetChild(0).GetComponent <MeshRenderer>().material.GetColor("_TintColor"); FlameTint.a = 0f; LanternLight.intensity = 0f; currentSprite = spritePrefix + oilPercentage; reductionFactor = oilPercentage - lightReductionRate; }