Beispiel #1
0
    void Start()
    {
        audio      = GetComponent <AudioSource>();
        clearSE    = Resources.Load("se_maoudamashii_onepoint11") as AudioClip;
        gameOverSE = Resources.Load("se_maoudamashii_se_syber01") as AudioClip;

        // 制限時間を設定
        time = timeLimit;

        // staticメンバの初期化
        //infectedNum = 0;
        killedNum = 0;

        // 加速率の初期値設定
        acceleratorRate = minAccelRate;
        score           = 0.0f;
        isStartPandemic = false;

        actorNum     = GameObject.FindGameObjectsWithTag("Actor").Length;
        pandemic     = GameObject.Find("AIManger").GetComponent <AIManager>();
        endUI        = GameObject.Find("ScreenUI").GetComponent <GameEndUI>();
        overFlag     = GameObject.Find("Player").GetComponent <VirusAmount>();
        clearPanelUI = GameObject.Find("ClearPanel").GetComponent <PanelSlider>();
        overPanelUI  = GameObject.Find("OverPanel").GetComponent <PanelSlider>();

        // デバッグ処理
        if (saveStr == null)
        {
            Debug.Log("saveStr is null");
            Debug.Break();
        }
        GameObject player = GameObject.Find("Player");

        playerVirus = player.GetComponent <Virus>();
    }
Beispiel #2
0
 void Next(PanelSlider panel)
 {
     if (panel.KeepLoaded)
     {
         this.myPanelsBack.Push(panel);
         this.myActivePanel = panel;
         panel.Swipe(true);
     }
 }
Beispiel #3
0
 void Start() {
     // ジェスチャー有効化
     controller.EnableGesture(Gesture.GestureType.TYPECIRCLE);
     controller.EnableGesture(Gesture.GestureType.TYPEKEYTAP);
     controller.EnableGesture(Gesture.GestureType.TYPESCREENTAP);
     controller.EnableGesture(Gesture.GestureType.TYPE_SWIPE);
     Connect ();
     panel = UIPanel.GetComponent<PanelSlider>();
     StartCoroutine(GetItems(APIAdress));
     //StartCoroutine(GetItemImage("http://localhost:2000/images/Orange.jpg"));
 }
Beispiel #4
0
 void Back()
 {
     if (this.myActivePanel.KeepLoaded)
     {
         this.myPanelsNext.Push(this.myActivePanel);
         var panel = myPanelsBack.Pop();
         this.myActivePanel.Swipe(false);
         var backPanel = this.myPanelsBack.Pop();
         this.myActivePanel = backPanel;
         backPanel.Swipe(true);
     }
 }
Beispiel #5
0
        internal void ShowNotiz(Notiz notiz)
        {
            var notizPanel = new PanelNotiz(this, notiz, this.myKunde, false);

            if (this.myActivePanel.KeepLoaded)
            {
                this.myPanelsBack.Push(this.myActivePanel);
            }
            this.myActivePanel.Swipe(false);
            notizPanel.Swipe(true);
            this.myActivePanel = notizPanel;
            this.ToggleCloseButton();
        }
Beispiel #6
0
        internal void ShowSoftware(Kundensoftware software)
        {
            var softwarePanel = new PanelSoftware(this, software, true);

            if (myActivePanel.KeepLoaded)
            {
                myPanelsBack.Push(myActivePanel);
            }
            this.myActivePanel.Swipe(false);
            softwarePanel.Swipe(true);
            this.myActivePanel = softwarePanel;
            this.ToggleCloseButton();
        }
Beispiel #7
0
        internal void ShowAngebotsdetail(Offer angebot)
        {
            var angebotsDetailPanel = new PanelAngebotsdetail(this, angebot, true);

            if (myActivePanel.KeepLoaded)
            {
                myPanelsBack.Push(myActivePanel);
            }
            myActivePanel.Swipe(false);
            angebotsDetailPanel.Swipe(true);
            this.myActivePanel = angebotsDetailPanel;
            this.ToggleCloseButton();
        }
Beispiel #8
0
        void mbtnNext_Click(object sender, EventArgs e)
        {
            var currentActive = myActivePanel;
            var nextActive    = myPanelsNext.Pop();

            if (currentActive.KeepLoaded)
            {
                myPanelsBack.Push(currentActive);
            }
            currentActive.Swipe(false);
            myActivePanel = nextActive;
            myActivePanel.Swipe(true);
            ToggleCloseButton();
        }
Beispiel #9
0
 internal void LoadOrShowAngebote()
 {
     if (this.myAngebotsPanel == null)
     {
         this.myAngebotsPanel = new PanelAngebote(this, myKunde, true);
     }
     if (this.myActivePanel.KeepLoaded)
     {
         this.myPanelsBack.Push(myActivePanel);
     }
     myActivePanel.Swipe(false);
     myAngebotsPanel.Swipe(true);
     myActivePanel = myAngebotsPanel;
     ToggleCloseButton();
 }
Beispiel #10
0
        //internal pnlMaschinendetail ShowMaschine(Kundenmaschine kundenmaschine)
        internal PanelKundenMaschine ShowMaschine(Kundenmaschine kundenmaschine)
        {
            //var detailPanel = new pnlMaschinendetail(this, kundenmaschine, true);
            var detailPanel = new PanelKundenMaschine(this, kundenmaschine);

            if (this.myActivePanel.KeepLoaded)
            {
                this.myPanelsBack.Push(this.myActivePanel);
            }
            this.myActivePanel.Swipe(false);
            detailPanel.Swipe(true);
            this.myActivePanel = detailPanel;
            this.ToggleCloseButton();
            return(detailPanel);
        }
Beispiel #11
0
 internal void LoadOrShowNotizen()
 {
     if (this.myNotizenPanel == null)
     {
         this.myNotizenPanel = new PanelNotizen(this, this.myKunde, true);
     }
     if (this.myActivePanel.KeepLoaded)
     {
         this.myPanelsBack.Push(this.myActivePanel);
     }
     this.myActivePanel.Swipe(false);
     this.myNotizenPanel.Swipe(true);
     this.myActivePanel = myNotizenPanel;
     this.ToggleCloseButton();
 }
Beispiel #12
0
 internal void LoadOrShowKundensoftware()
 {
     if (this.mySoftwarePanel == null)
     {
         this.mySoftwarePanel = new PanelSoftwareliste(this, this.myKunde, true);
     }
     if (this.myActivePanel.KeepLoaded)
     {
         this.myPanelsBack.Push(this.myActivePanel);
     }
     this.myActivePanel.Swipe(false);
     this.mySoftwarePanel.Swipe(true);
     this.myActivePanel = mySoftwarePanel;
     this.ToggleCloseButton();
 }
Beispiel #13
0
 internal void LoadOrShowKontakte()
 {
     if (this.myKontaktePanel == null)
     {
         this.myKontaktePanel = new Panel.PanelKontakte(this, myKunde, true);
     }
     if (this.myActivePanel.KeepLoaded)
     {
         myPanelsBack.Push(this.myActivePanel);
     }
     this.myActivePanel.Swipe(false);
     this.myKontaktePanel.Swipe(true);
     this.myActivePanel = this.myKontaktePanel;
     this.ToggleCloseButton();
 }
Beispiel #14
0
 internal void ShowStartPanel()
 {
     this.myPanelsBack.Clear();
     this.myPanelsNext.Clear();
     if (this.myActivePanel != null)
     {
         this.myActivePanel.Swipe(false);
     }
     if (this.myStartPanel == null)
     {
         this.myStartPanel = new PanelKundeStart(this, myKunde, true);
     }
     this.myPanelsBack.Push(this.myStartPanel);
     this.myActivePanel = this.myStartPanel;
     this.myActivePanel.Swipe(true);
     this.ToggleCloseButton();
 }
Beispiel #15
0
 internal void LoadOrShowArtikeldetail(Product product)
 {
     if (this.myArtikelDetailPanel != null)
     {
         this.myArtikelDetailPanel.Dispose();
         this.myArtikelDetailPanel = null;
     }
     this.myArtikelDetailPanel = new PanelArtikeldetail(this, myKunde, product, true);
     if (this.myActivePanel.KeepLoaded)
     {
         myPanelsBack.Push(myActivePanel);
     }
     myActivePanel.Swipe(false);
     myArtikelDetailPanel.Swipe(true);
     myActivePanel = myArtikelDetailPanel;
     ToggleCloseButton();
 }
Beispiel #16
0
                         "できたら、もう一度Codeボタンを押そう。",                     "スタートで攻撃できるよ",                            "その調子!頑張って!", "勝ったわ!おめでとう!" };//length 9
 // Use this for initialization
 void Start()
 {
     if (SceneManager.GetActiveScene().name != "Classroom_q1")
     {
         Button_flag = true;
     }
     MCforTS            = GameObject.Find("Main Camera").GetComponent <MainCamera> ();
     tutorial_text      = GameObject.Find("Tutorial_Text").GetComponent <Text>();
     PS                 = GameObject.Find("CodingPanel").GetComponent <PanelSlider>();
     _start_btn         = GameObject.Find("StartButton").GetComponent <ButtonClick> ();
     _enemy_ctrl        = GameObject.Find("Enemy").GetComponent <EnemyController>();
     tutorial_text.text = text_array[clickCnt];
     downArrow          = GameObject.Find("Down_Arrow").GetComponent <Image>();
     if (SceneManager.GetActiveScene().name == "Classroom_q1")
     {
         StartCoroutine(TSlider(true));
     }
     //downArrow = Instantiate(Resources.Load("Prefabs/Down_Arrow", typeof(Image))) as Image;
 }
Beispiel #17
0
        public override void Setup()
        {
            var ownerTransform = this.transform as RectTransform;

            _panelSlider = new PanelSlider(ownerTransform, _panelSliderConfig, ownerTransform.localPosition, _closedPosition);

            _panelSlider.OnOpenCompleted.Subscribe(_ => OnOpenCompleted.Execute());
            _panelSlider.OnCloseCompleted.Subscribe(_ => OnCloseCompleted.Execute());

            _closeButton?.OnClickAsObservable()
            .Subscribe(_ => Close())
            .AddTo(this);

            if (_startClosed)
            {
                _panelSlider.SetClosed();
            }
            else
            {
                _panelSlider.SetOpen();
            }
        }
Beispiel #18
0
 void Start()
 {
     // ジェスチャー有効化
     controller.EnableGesture(Gesture.GestureType.TYPECIRCLE);
     controller.EnableGesture(Gesture.GestureType.TYPEKEYTAP);
     controller.EnableGesture(Gesture.GestureType.TYPESCREENTAP);
     controller.EnableGesture(Gesture.GestureType.TYPE_SWIPE);
     Connect ();
     panel = UIPanel.GetComponent<PanelSlider>();
     StartCoroutine(GetItems(APIAdress));
     //StartCoroutine(GetItemImage("http://localhost:2000/images/Orange.jpg"));
 }