Beispiel #1
0
        public void SetResponse(SerializableWebResponse response)
        {
            switch (_currentStage)
            {
            case stage.GetHiddenFields:
                //Advance to the next stage
                _currentStage = stage.Authenticate;
                processLoginFormHiddenFields(response);
                break;

            case stage.Authenticate:
                //Advance to the next stage
                _currentStage = stage.PostAuthenticateRedirect;
                processSendCredentialsResponse(response);
                break;

            case stage.PostAuthenticateRedirect:
                //Advance to the next stage
                _currentStage = stage.RunReports;
                processPostAuthenticateResponse(response);
                break;

            case stage.RunReports:
                processReportResponse(response);
                break;
            }
        }
Beispiel #2
0
    public void NextStage()
    {
        switch (currentstage)
        {
        case stage.fire:
            currentstage = stage.sword;
            break;

        case stage.sword:
            currentstage = stage.fire;
            break;
        }


        if (manager.HullPoint <= 0)
        {
            LoseBattle();
        }
        else if (elp <= 0)
        {
            WinBattle();
        }
        else
        {
            ContinueBattle();
        }
    }
    private void OnTriggerEnter(Collider collision)
    {
        if (collision.CompareTag("Portal") && teleportFlag == false)
        {
            InfecteeGenerator.enemyPool.ClearItem();

            foreach (Transform child in infecteeParent.transform)
            {
                child.GetChild(0).gameObject.GetComponent <NavMeshAgent>().enabled = false;
            }

            if (currentStage == stage.STAGE_1)
            {
                SceneManager.LoadScene("Stage2");
                currentStage = stage.STAGE_2;
                TeleportPos  = new Vector3(0, 0, -6);
                isEnd        = true;
                InfecteeGenerator.stage_EnemyZone = GameObject.FindGameObjectsWithTag("SpawnZone");
            }

            //foreach (Transform child in infecteeParent.transform)
            //{
            //    child.GetChild(0).gameObject.GetComponent<NavMeshAgent>().enabled = true;
            //}
            teleportFlag = true;
        }
    }
Beispiel #4
0
        /// <summary>
        /// 기본 생성자
        /// </summary>
        private DataManager()
        {
            stage stageKbs = new stage();

            stageKbs.ID         = 3;
            stageKbs.Name       = "KBS";
            stageKbs.TKCategory = 1;
            this.broadList.Add(stageKbs);

            stage stageMbc = new stage();

            stageMbc.ID         = 4;
            stageMbc.Name       = "MBC";
            stageMbc.TKCategory = 1;
            this.broadList.Add(stageMbc);

            stage stageSbs = new stage();

            stageSbs.ID         = 5;
            stageSbs.Name       = "SBS";
            stageSbs.TKCategory = 1;
            this.broadList.Add(stageSbs);

            stage stageYtn = new stage();

            stageYtn.ID         = 6;
            stageYtn.Name       = "YTN";
            stageYtn.TKCategory = 1;
            this.broadList.Add(stageYtn);
        }
Beispiel #5
0
 void MakeInstance()
 {
     if (instance == null)
     {
         instance = this;
     }
 }
Beispiel #6
0
    // Use this for initialization
    void Start()
    {
        GameObject map = GameObject.FindWithTag("map");

        stagescript = map.GetComponent <stage>();
        speed       = stagescript.speed;
    }
Beispiel #7
0
    void Update()
    {
        GetLifes();
        //Check current stage
        switch (currentStage)
        {
        case stage.Left:
            if (leftArm.GetLife() <= 0)
            {
                leftArm_Destroyed = true;
                currentStage      = stage.Right;
                StartCoroutine(SwitchPhase());
            }
            break;

        case stage.Right:
            if (rightArm.GetLife() <= 0)
            {
                rightArm_Destroyed = true;
                currentStage       = stage.Head;
                StartCoroutine(SwitchPhase());
            }
            break;

        case stage.Head:
            if (head.GetLife() <= 0)
            {
                DetatchObjects(thirdSequenceObj);
                StartCoroutine("WinSequence");
                pauseSnap.TransitionTo(0.2f);
            }
            break;
        }
    }
Beispiel #8
0
        public override void Draw(Microsoft.Xna.Framework.Graphics.SpriteBatch sB, GraphicsDeviceManager gM, bool drawHUD)
        {
            sB.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend);
            sB.GraphicsDevice.Clear(Color.White);
            if (textures.GetLoadPercent() > 65)
            {
                controls.Draw(sB, Vector2.Zero, null);
            }
            else
            {
                logo.Draw(sB, Vector2.Zero, null);
            }

            if (textures.GetLoadPercent() != 100)
            {
                textures.DrawString(sB, "Loading " + textures.GetLoadPercent() + "%", new Vector2(624, 624), Color.Gray, TextureManager.FontSizes.small, true);
            }
            else
            {
                textures.DrawString(sB, "Finished Loading\n   Press Start", new Vector2(624, 624), Color.Gray, TextureManager.FontSizes.small, true);
            }
            sB.End();

            theStage = stage.loading;
        }
Beispiel #9
0
    void Peak()
    {
        m_LevelStage = stage.peak;

        if (m_StressLevel.CurrentStress > m_MaxStressPeak)
        {
            m_MaxStressPeak = m_StressLevel.CurrentStress;
        }

        if (!m_ChangeTemplateOnce)
        {
            if (m_MaxStressBuildUp < 50)
            {
                SpawnManager.Instance.ChangeGameObjects(m_HeavyZombie);
            }
            else if (m_MaxStressBuildUp > 50)
            {
                SpawnManager.Instance.ChangeGameObjects(m_FastZombie);
            }

            m_ChangeTemplateOnce = true;
        }

        SpawnManager.Instance.SpawnWave();
        m_CurrentFrequency = m_PhaseLength / (40 / ((m_MaxStressBuildUp + 20) / 10));
        Debug.Log(m_CurrentFrequency);
        Invoke("DirectorLoop", m_CurrentFrequency);
    }
Beispiel #10
0
    public override void Cook()
    {
        float percentage = burnCounter / timeToBurn;

        if (percentage < 1)
        {
            burnCounter += Time.deltaTime;
            SetFactor(Helper.Remap(percentage, 0, 1, 0, 3));             //3 is the max amount the "_Factor" property of the shader can go

            if (percentage > minMaxCooking.x && currentStage == stage.Raw)
            {
                currentStage = stage.WellDone;
                if (readyEffect != null)
                {
                    readyEffect.SetActive(true);
                }
            }
            else if (percentage > minMaxCooking.y && currentStage == stage.WellDone)
            {
                currentStage = stage.Burnt;
                if (burnSmoke != null)
                {
                    burnSmoke.SetActive(true);
                }
            }
        }
    }
Beispiel #11
0
        public ActionResult DeleteConfirmed(int id)
        {
            stage stage = db.stages.Find(id);

            db.stages.Remove(stage);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
    void Start()
    {
        currentStage = stage.none;
        state        = st.sleep;

        pupil = GameObject.Find("Pupil").GetComponent <FollowPlayerPupilScript>();
        pupil.followPlayer = false;
        pupil.GetComponent <SpriteRenderer>().color = new Color(1, 1, 1, 0);
    }
Beispiel #13
0
 public Logo()
     : base(null, new Dictionary <Type, int>(), new Vector2(1248, 720), null, null)
 {
     textures = new TextureManager();
     logo     = new Sprite("Textures/Backgrounds/LogoScreen/splashLogoCombined", DEFAUT_SCREEN_SIZE / 2);
     controls = new Sprite("Textures/Backgrounds/LogoScreen/controllerSplash", DEFAUT_SCREEN_SIZE / 2);
     theStage = stage.drawing;
     sounds   = new AudioManager();
 }
Beispiel #14
0
    private void Start()
    {
        characterController = GetComponent <CharacterController>();
        currentStage        = stage.STAGE_1;
        maxHp          = hp;
        infecteeParent = GameObject.Find("Generator");

        DontDestroyOnLoad(gameObject);
    }
Beispiel #15
0
    void Start()
    {
        currentStage = stage.Left;

        StartCoroutine(SwitchPhase());
        maxLife = leftLife + rightLife + headLife;
        InvokeRepeating("UpdateLife", 0, 0.1f);
        GetLifes();
    }
Beispiel #16
0
 public ActionResult Edit([Bind(Include = "stageId,code,name,description,pipeId")] stage stage)
 {
     if (ModelState.IsValid)
     {
         db.Entry(stage).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.pipeIdList = new SelectList(db.pipes, "pipeId", "code", stage.pipeId);
     return(View(stage));
 }
Beispiel #17
0
 private void advanceStage()
 {
     if (currentStage == stage.S33_checkAlt3)
     {
         multiplier  *= 2;
         currentStage = stage.S30_checkAlt0;
     }
     else
     {
         currentStage++;
     }
 }
    public void Stage_switch()
    {
        if (current_stage == stage.Hang)
        {
            Robots_controller.instance.init();

            current_stage = stage.Player_moving;
            return;
        }
        current_stage   = (stage)next[current_stage];
        stage_processed = false;
    }
Beispiel #19
0
 // Private methods
 private void Init()
 {
     blocks      = GameObject.FindGameObjectWithTag("Blocks").GetComponent <blocks>();
     target      = GameObject.FindGameObjectWithTag("Target").GetComponent <target>();
     sum         = GameObject.FindGameObjectWithTag("Sum").GetComponent <sum>();
     combo       = GameObject.FindGameObjectWithTag("Combo").GetComponent <combo>();
     timer       = GameObject.FindGameObjectWithTag("Timer").GetComponent <timer>();
     lifes_score = GameObject.FindGameObjectWithTag("LifesScore").GetComponent <lifes_score>();
     game_over   = GameObject.FindGameObjectWithTag("GameOver").GetComponent <game_over>();
     stage       = GameObject.FindGameObjectWithTag("Stage").GetComponent <stage>();
     refresh     = GameObject.FindGameObjectWithTag("Refresh").GetComponent <refresh>();
 }
        //Repeat for stage selection combobox.
        private void stageDescriptionComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            object _SelectedStage = sender;

            stageViewSource = (CollectionViewSource)Application.Current.MainWindow.FindResource("stageViewSource");
            //methodViewSource = (CollectionViewSource)Application.Current.MainWindow.FindResource("methodViewSource");

            SelectedStage = (stage)stageDescriptionComboBox.SelectedItem;

            bidstagesViewSource.Filter     += new FilterEventHandler(bidstagesViewSource_Filter);
            methodactionsViewSource.Filter += new FilterEventHandler(methodActionsViewSource_Filter);
        }
Beispiel #21
0
        public ActionResult Create([Bind(Include = "stageId,code,name,description,pipeId")] stage stage)
        {
            if (ModelState.IsValid)
            {
                db.stages.Add(stage);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            ViewBag.pipeIdList = new SelectList(db.pipes, "pipeId", "code", stage.pipeId);
            return(View(stage));
        }
Beispiel #22
0
 private void OnEnable()
 {
     burnCounter = 0;
     SetFactor(burnCounter);
     currentStage = stage.Raw;
     if (readyEffect != null)
     {
         readyEffect.SetActive(false);
     }
     if (burnSmoke != null)
     {
         burnSmoke.SetActive(false);
     }
 }
Beispiel #23
0
        // GET: /CRM/stages/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            stage stage = db.stages.Find(id);

            if (stage == null)
            {
                return(HttpNotFound());
            }
            return(View(stage));
        }
Beispiel #24
0
    public void StartBattle(Enemy enemy)
    {
        latestenemy  = enemy;
        currentstage = stage.fire;



        elp      = enemy.hp;
        esp      = enemy.sp;
        efp      = enemy.fp;
        log.text = "-Captain, we have spotted a " + enemy.name + ", just give the order and we'll send those scurvy dogs to the bottom of the sea.";
        window.SetActive(true);
        ContinueBattle();
    }
 void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     else
     {
         Destroy(gameObject);
     }
     current_stage = stage.Hang;
     score_evador  = 0;
     movecount     = 0;
     index_in_list = 0;
 }
Beispiel #26
0
        // GET: /CRM/stages/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            stage stage = db.stages.Find(id);

            if (stage == null)
            {
                return(HttpNotFound());
            }
            ViewBag.pipeIdList = new SelectList(db.pipes, "pipeId", "code", stage.pipeId);
            return(View(stage));
        }
Beispiel #27
0
    void BuildUp()
    {
        m_LevelStage = stage.buildUp;

        if (m_StressLevel.CurrentStress > m_MaxStressBuildUp)
        {
            m_MaxStressBuildUp = m_StressLevel.CurrentStress;
        }

        SpawnManager.Instance.ChangeGameObjects(m_NormalZombie);
        SpawnManager.Instance.SpawnWave();
        m_CurrentFrequency = m_PhaseLength / (m_PhaseLength / (8));

        Invoke("DirectorLoop", m_CurrentFrequency);
    }
Beispiel #28
0
 // Start is called before the first frame update
 void Start()
 {
     game_manager = GameObject.FindGameObjectWithTag("GameManager").GetComponent <GameManager>();
     block_array  = gameObject.GetComponentsInChildren <block>();
     target       = GameObject.FindGameObjectWithTag("Target").GetComponent <target>();
     sum          = GameObject.FindGameObjectWithTag("Sum").GetComponent <sum>();
     combo        = GameObject.FindGameObjectWithTag("Combo").GetComponent <combo>();
     timer        = GameObject.FindGameObjectWithTag("Timer").GetComponent <timer>();
     lifes_score  = GameObject.FindGameObjectWithTag("LifesScore").GetComponent <lifes_score>();
     stage        = GameObject.FindGameObjectWithTag("Stage").GetComponent <stage>();
     refresh      = GameObject.FindGameObjectWithTag("Refresh").GetComponent <refresh>();
     swipe        = GameObject.FindGameObjectWithTag("Swipe").GetComponent <ParticleSystem>();
     audio        = gameObject.GetComponent <AudioSource>();
     generate_random_numbers();
     set_block_clickabable_array();
     damage_off();
 }
Beispiel #29
0
 void Timeout()
 {
     print("Timeout");
     for (int i = 0; i < maxCharacterNum; i++)
     {
         if (!actionObjects[i].isSet)
         {
             if (shadows[i] == null)
             {
                 int playerIndex = (playerID == 1) ? i : maxCharacterNum * 2 - 1 - i;
                 actionObjects[i].moveTarget = animals[playerIndex].player.transform.localPosition;
             }
             else
             {
                 actionObjects[i].moveTarget = shadows[i].transform.localPosition;
             }
             actionObjects[i].weapon = weapons[0];
         }
     }
     if (!actionObjects[nowCharacterID].isSet)
     {
         if (nowStage - stage.Weapon >= 0)
         {
             actionObjects[nowCharacterID].weapon = nowWeapon;
         }
         else
         {
             actionObjects[nowCharacterID].weapon = weapons[0];
         }
         if (shadows[nowCharacterID] == null)
         {
             int playerIndex = (playerID == 1) ? nowCharacterID : maxCharacterNum * 2 - 1 - nowCharacterID;
             actionObjects[nowCharacterID].moveTarget = animals[playerIndex].player.transform.localPosition;
         }
         else
         {
             actionObjects[nowCharacterID].moveTarget = shadows[nowCharacterID].transform.localPosition;
         }
         if (actionObjects[nowCharacterID].weapon != weapons[0])
         {
             actionObjects[nowCharacterID].attackTarget = targets[nowCharacterID].transform.localPosition;
         }
     }
     nowStage = stage.Complete;
 }
Beispiel #30
0
    void Relax()
    {
        m_LevelStage    = stage.relax;
        m_AverageStress = (m_MaxStressBuildUp + m_MaxStressPeak) / 2;
        m_RelaxTimer   += Time.deltaTime;

        SpawnPickUps();
        if (m_RelaxTimer > m_AverageStress / 3) //divided by 3 otherwise relax stage is too long
        {
            m_Timer            = 0.0f;
            m_MaxStressBuildUp = 0.0f;
            m_MaxStressPeak    = 0.0f;
            m_PhaseLength     += 2.0f; //phaseLength is increased for harder difficulty
            m_RelaxTimer       = 0.0f;
            m_DoOnce           = false;
            SpawnManager.Instance.ChangeGameObjects(m_NormalZombie);
            m_SpawnPickUpOnce = false;
        }
        Invoke("DirectorLoop", 0.01f);
    }