extends Control
class_name WeaponItemSub

var icon : TextureRect
var slot : TextureRect

func init(value:Texture2D):
	icon = $WeaponIcon
	slot = $WeaponSlot
	icon.texture = value

func update_alpha(alpha_from:float,alpha_to:float,rate:float):
	var alpha = lerp(alpha_from,alpha_to,rate)
	icon.modulate = Color(1,1,1,alpha)
	slot.modulate = Color(1,1,1,alpha)
	
