Example #1
0
        public override void CloseHUD(UIHUD hud)
        {
            switch (hud)
            {
            case UIHUD.InGame_Normal:
                NormalHUD.SetActive(false);
                break;

            case UIHUD.InGame_Battle:
                BattleHUD.SetActive(false);
                break;
            }
        }
Example #2
0
    void TestHUD()
    {
        //准备数据
        StructUIHUD data = new StructUIHUD();

        data.ActorName    = "骷髅弓箭手";
        data.FollowObject = gameObject;
        data.CurHP        = 10;
        data.MaxHP        = 10;

        UIHUD uihud = UIHUD.Create(data, transform);

        //监听事件
        OnHPChangeEvent += uihud.OnEventHPChange;
        OnDeadEvent     += uihud.OnEventActorDie;
        OnPlaySkill     += uihud.OnEventActorPlaySkill;
    }
Example #3
0
    void Awake()
    {
        instance = this;

        uiHUD           = gameObject.GetComponent <UIHUD>();
        uiOverlay       = gameObject.GetComponent <UIOverlay>();
        uiAbility       = gameObject.GetComponent <UIAbilityButtons>();
        uiPerkMenu      = gameObject.GetComponent <UIPerkMenu>();
        uiGameOver      = gameObject.GetComponent <UIGameOver>();
        uiUnitPlacement = gameObject.GetComponent <UIUnitPlacement>();

        //uiHUD.enabled=false;
        uiOverlay.enabled = false;
        //uiAbility.enabled=false;
        uiGameOver.enabled      = false;
        uiUnitPlacement.enabled = false;

        colorH = new Color(1f, .6f, 0f, 1f);
        colorN = new Color(1f, .85f, .75f, 1f);
        texBar = Resources.Load("Textures/Bar", typeof(Texture)) as Texture;
    }
Example #4
0
	void Awake(){
		
		instance=this;
		
		uiHUD=gameObject.GetComponent<UIHUD>();
		uiOverlay=gameObject.GetComponent<UIOverlay>();
		uiAbility=gameObject.GetComponent<UIAbilityButtons>();
		uiPerkMenu=gameObject.GetComponent<UIPerkMenu>();
		uiGameOver=gameObject.GetComponent<UIGameOver>();
		uiUnitPlacement=gameObject.GetComponent<UIUnitPlacement>();
		
		//uiHUD.enabled=false;
		uiOverlay.enabled=false;
		//uiAbility.enabled=false;
		uiGameOver.enabled=false;
		uiUnitPlacement.enabled=false;
		
		colorH=new Color(1f, .6f, 0f, 1f);
		colorN=new Color(1f, .85f, .75f, 1f);
		texBar=Resources.Load("Textures/Bar", typeof(Texture)) as Texture;
		
		
	}
Example #5
0
 public virtual void CloseHUD(UIHUD hud)
 {
 }
Example #6
0
 public virtual void ShowHUD(UIHUD hud)
 {
 }
 private void Start()
 {
     _uiHUD = UIManager.Instance.HUDPanel;
 }