public override void Start()
    {
        hp_bar_boss = GetLinkedObject("hp_bar_boss");
        hp_bar_boss.GetComponent <BossHPBar>().ActivateHPBar(false);
        hp_bar_boss.SetActive(false);
        GetLinkedObject("enemies_manager").GetComponent <EnemiesManager>().AddBoss(gameObject);

        boss_title      = GetLinkedObject("boss_title");
        boss_title_text = boss_title.GetComponent <CompText>();

        rand_gen = new System.Random();

        //Phase1Textures();
        current_action = GetComponent <Idle_Action>();
        GetComponent <CompAnimation>().PlayAnimation("Presentation");
        GetComponent <CompAnimation>().SetEnabled(false);

        current_hp  = total_hp;
        boss_active = false;

        rumble_timer = 0.0f;
        rumble       = false;

        boss_dead             = false;
        boss_dead_delay_timer = 0.0f;

        boss_title_timer = 0.0f;
        boss_title_on    = false;
        boss_title.SetActive(false);

        base.Start();
    }
Example #2
0
        private void layProgressText(int index)
        {
            CompText ct = new CompText(mMainWindow, 10);

            ct.SetText("第" + (index + 1).ToString() + "题,共" + mItems.Count + "题");
            mMainWindow.amCanvas.Children.Add(ct);
            Canvas.SetTop(ct, mMainWindow.Height - 180);
            Canvas.SetLeft(ct, mMainWindow.Width / 2 - 65);
        }
    protected void LinkComponents(GameObject icon_obj, GameObject icon_hp_obj, GameObject icon_stamina_obj, GameObject icon_mana_obj,
                                  GameObject left_button_obj, GameObject right_button_obj, GameObject sec_button_obj, GameObject sec_button_idle_obj,
                                  GameObject left_counter_obj, GameObject right_counter_obj, GameObject sec_counter_obj,
                                  GameObject left_arm_obj, GameObject right_arm_obj,
                                  GameObject left_button_idle_obj, GameObject right_button_idle_obj)
    {
        //LEFT ARM
        left_arm = left_arm_obj.GetComponent <CompMesh>();

        //RIGHT ARM
        right_arm = right_arm_obj.GetComponent <CompMesh>();

        //LEFT BUTTON
        left_button     = left_button_obj.GetComponent <CompButton>();
        left_button_img = left_button_obj.GetComponent <CompImage>();
        if (left_counter_obj != null)
        {
            left_counter = left_counter_obj.GetComponent <CompText>();
        }
        left_button_idle_img = left_button_idle_obj.GetComponent <CompImage>();

        //RIGHT BUTTON
        right_button     = right_button_obj.GetComponent <CompButton>();
        right_button_img = right_button_obj.GetComponent <CompImage>();
        if (right_counter_obj != null)
        {
            right_counter = right_counter_obj.GetComponent <CompText>();
        }
        right_button_idle_img = right_button_idle_obj.GetComponent <CompImage>();

        //SECONDARY BUTTON
        sec_button     = sec_button_obj.GetComponent <CompButton>();
        sec_button_img = sec_button_obj.GetComponent <CompImage>();
        if (sec_counter_obj != null)
        {
            sec_counter = sec_counter_obj.GetComponent <CompText>();
        }
        sec_button_trans = sec_button_obj.GetComponent <CompRectTransform>();

        sec_button_idle_img   = sec_button_idle_obj.GetComponent <CompImage>();
        sec_button_idle_trans = sec_button_idle_obj.GetComponent <CompRectTransform>();

        //HUD ICON
        icon_trans  = icon_obj.GetComponent <CompRectTransform>();
        icon_img    = icon_obj.GetComponent <CompImage>();
        icon_hp_img = icon_hp_obj.GetComponent <CompImage>();
        if (icon_mana_obj != null)
        {
            icon_mana_img = icon_mana_obj.GetComponent <CompImage>();
        }
        if (icon_stamina_obj != null)
        {
            icon_stamina_img = icon_stamina_obj.GetComponent <CompImage>();
        }
    }
Example #4
0
        private void layTextSelection(int index, int UIselected)
        {
            Dictionary <int, StSelection> selection = mItems[index].Selections;
            List <UserControl>            list      = new List <UserControl>();

            for (int i = 0; i < selection.Count; i++)
            {
                CompText ct = new CompText(mMainWindow, 10);
                ct.SetText(selection[i].Casual);
                mMainWindow.amCanvas.Children.Add(ct);
                Canvas.SetTop(ct, mVerTaken);
                Canvas.SetLeft(ct, (mMainWindow.Width - ct.Width) / 2);
                mVerTaken += CompText.HEIGHT + SEL_GAP;
                list.Add(ct);
            }


            //mMainWindow.Height = mVerTaken + CompText.HEIGHT + 100;
            mSelGrp.Set(list, UIselected);
        }
 protected void LinkTextTimer(GameObject text_obj)
 {
     timer_text = text_obj.GetComponent <CompText>();
 }