Ejemplo n.º 1
0
    private IEnumerator LeaveScene()
    {
        yield return(new WaitForSeconds(10));

        GameObject.FindGameObjectWithTag("GameController").GetComponent <GameController>().DDoSPuzzle = true;
        PuzzleSceneManager.ExitPuzzle();
    }
 public void ActivateLoseState()
 {
     if (!InLoseState)
     {
         InLoseState = true;
         timeText.transform.parent.gameObject.SetActive(false);
         PuzzleSceneManager.SceneSwitch("LoseScene");
     }
 }
 public void ActivateWinState()
 {
     if (!InWinState)
     {
         InWinState           = true;
         timer.timerIsRunning = false;
         timeText.transform.parent.gameObject.SetActive(false);
         PuzzleSceneManager.SceneSwitch("WinScene");
     }
 }
    public void OnClick()
    {
        if (password.text == expectedPassword)
        {
            //Disable interaction
            password.interactable = false;

            //Go to email puzzle
            PuzzleSceneManager.SwitchToPuzzle("ShutdownSecurityScene");
        }
        password.text = "";
    }
    // Update is called once per frame
    void Update()
    {
        if (Input.GetKeyDown(KeyCode.P))
        {
            PuzzleSceneManager.SwitchToPuzzle("TestPuzzle");
        }

        if (Input.GetKeyDown(KeyCode.E))
        {
            PuzzleSceneManager.ExitPuzzle();
        }
    }
Ejemplo n.º 6
0
    public void OnClick()
    {
        if (email.text == expectedEmail && password.text == expectedPassword)
        {
            GameObject controller = GameObject.FindGameObjectWithTag("GameController");

            //Disable interaction
            password.interactable = false;

            //Go to email puzzle
            PuzzleSceneManager.SwitchToPuzzle("6.PhishingEmail");
        }
    }
    public void OnClick()
    {
        Debug.Log("clicked");
        if (username.text == expectedUsername && password.text == expectedPassword)
        {
            //Disable interaction
            password.interactable = false;

            //Go to email puzzle
            PuzzleSceneManager.SwitchToPuzzle("8.DDoSScene");
        }
        password.text = "";
    }
    public void StartGame()
    {
        //Main room
        PuzzleSceneManager.SceneSwitch("GameScene");

        //Reset booleans
        ResetBooleans();

        //Starting timer
        timer.ResetTime();
        timeText.transform.parent.gameObject.SetActive(true);
        timer.timerIsRunning = true;
    }
Ejemplo n.º 9
0
 // Update is called once per frame
 void Update()
 {
     if (Keyboard.current.pKey.wasPressedThisFrame)
     {
         PuzzleSceneManager.SwitchToPuzzle("1.EmailLogin");
     }
     if (Keyboard.current.oKey.wasPressedThisFrame)
     {
         PuzzleSceneManager.SwitchToPuzzle("TestPuzzle2");
     }
     if (Keyboard.current.eKey.wasPressedThisFrame)
     {
         PuzzleSceneManager.ExitPuzzle();
     }
 }
Ejemplo n.º 10
0
 // Use this for initialization
 void Start()
 {
     refObj = GameObject.Find("PuzzleSceneManager");
     for (int i = 0; i < 2; i++)
     {
         for (int j = 0; j < HAND_NUM; j++)
         {
             objText[i, j]  = GameObject.Find("ExplainText" + i.ToString() + j.ToString());
             objImage[i, j] = GameObject.Find("ExplainBack" + i.ToString() + j.ToString());
         }
     }
     p1  = refObj.GetComponent <PuzzleSceneManager>();
     c1  = refObj.GetComponent <CardData>();
     n10 = int.Parse(name.Substring(4)) / 10;
     n1  = int.Parse(name.Substring(5));
 }
Ejemplo n.º 11
0
    public void DataChange()
    {
        this.name = "MatchManager";
        PuzzleSceneManager p1 = GameObject.Find("PuzzleSceneManager").GetComponent <PuzzleSceneManager>();

        for (int i = 0; i < DECKCARD_NUM; i++)
        {
            enemyLibrary[i] = p1.library[0, i];
        }
        enemyLibraryNum = p1.libraryNum[0];
        for (int i = 0; i < HAND_NUM; i++)
        {
            enemyHand[i] = p1.handCard[0, i];
        }
        wait = p1.waitCount[0];
        m_photonView.RPC("ChangeDataInput", PhotonTargets.Others, wait, enemyLibrary, enemyLibraryNum, enemyHand);
    }
Ejemplo n.º 12
0
 public void OnClickCancel()
 {
     PuzzleSceneManager.SwitchToPuzzle("PasswordScene");
 }
Ejemplo n.º 13
0
 public void OnClickCompleteProcess()
 {
     PuzzleSceneManager.SwitchToPuzzle("DecryptedSSLScene");
 }
Ejemplo n.º 14
0
 //Event handler for closing window
 public void OnClose()
 {
     PuzzleSceneManager.ExitPuzzle();
 }
Ejemplo n.º 15
0
 public void LeavePicture()
 {
     PuzzleSceneManager.ExitPuzzle();
 }
 public void ExitPuzzle()
 {
     PuzzleSceneManager.ExitPuzzle();
 }
Ejemplo n.º 17
0
 // Use this for initialization
 void Start()
 {
     p1           = GameObject.Find("PuzzleSceneManager").GetComponent <PuzzleSceneManager>();
     c1           = GameObject.Find("PuzzleSceneManager").GetComponent <CardData>();
     m_photonView = this.GetComponent <PhotonView>();
 }
Ejemplo n.º 18
0
 public void QuitGame()
 {
     PuzzleSceneManager.QuitGame();
 }
Ejemplo n.º 19
0
 public void OnClickPower()
 {
     GameObject.FindGameObjectWithTag("GameController").GetComponent <GameController>().DisableManagersSeecurityProtectionPuzzle = true;
     PuzzleSceneManager.ExitPuzzle();
 }
Ejemplo n.º 20
0
    /*
     * //★第二種呪文効果関数に使用する汎用関数★
     * //マナを減少させる効果
     * public void Slip(int player, int lostMana)
     * {
     *  int i, j;
     *  for (i = 0; i < HAND_NUM; i++)
     *  {
     *      for (j = 0; j < BLOCKTYPE_NUM + 1; j++)
     *      {
     *          if (p1.cardMana[player, i, j] >= p1.cardCost[player, i, j])//マナが足りて居たら
     *          {
     *              p1.cardMana[player, i, j] = p1.cardCost[player, i, j] - lostMana;//コストからlostMana分だけ足りないように
     *          }
     *          else
     *          {
     *              p1.cardMana[player, i, j] -= lostMana;//足りていなければその値からlostMana分減らす
     *          }
     *          if (p1.cardMana[player, i, j] < 0) { p1.cardMana[player, i, j] = 0; }//0未満になったら0に直す
     *      }
     *  }
     * }
     *
     * //カードを捨てる効果
     * public void Discard(int player)
     * {
     *  for (int i = 0; i < HAND_NUM; i++)
     *  {
     *      if (p1.useCard[player, i] == false)
     *      {
     *          p1.DrawCard(player, i);
     *          for (int j = 1; j < BLOCKTYPE_NUM + 1; j++) { p1.cardMana[player, i, j] = 0; }//カードに貯まったマナもリセット
     *          p1.useCard[player, i] = false;//新たに引いたので、使っていない状態になおす。
     *          //カードを使用していないので非表示を表示にする処理はいらない。
     *          StartCoroutine(p1.ShakeCard(player, i));
     *      }
     *  }
     * }
     *
     * //ライブラリを破壊する効果(残り0枚なら効果なし)
     * public void LibraryBreak(int player, int count)
     * {
     *  for (int l = 0; l < count; l++)
     *  {
     *      for (int i = 0; i < DECKCARD_NUM; i++)
     *      {
     *          if (p1.library[player, i, 0, 0] != 0)
     *          {//ライブラリの上から順にカードがある(0でない)ところまで探していく。
     *              p1.library[player, i, 0, 0] = 0;//カードを引いたのでライブラリから消す。
     *              p1.libraryNum[player]--;//ライブラリの残り枚数を1減らす。
     *              StartCoroutine(p1.ShakeDeck(player));
     *              break;
     *          }
     *      }
     *  }
     * }
     *
     * //カードをライブラリに戻す
     * public void HandEscape(int player)
     * {
     *  for (int i = 0; i < HAND_NUM; i++)
     *  {
     *      if (p1.useCard[player, i] == false)
     *      {
     *          LibraryPut(player, p1.handCard[player, i]);
     *          p1.useCard[player, i] = true;
     *          p1.cardSkill[player, i] = 0; //非表示のカードは効果を発揮しない。
     *          p1.objCard[player, i].GetComponent<Image>().enabled = false;//戻したので非表示
     *      }
     *  }
     * }
     *
     * //ライブラリの一番上にカードを置く
     * public void LibraryPut(int player, int cardnum)
     * {
     *  int i;
     *  if (p1.library[player, 0, 0, 0] == 0)//ライブラリが一杯でない時のみ
     *  {
     *      p1.libraryNum[player]++;
     *      p1.library[player, 0, 0, 0] = cardnum;
     *      //今あるカードの上に持って行く
     *      for (i = DECKCARD_NUM - 1; i > 0; i--)
     *      {
     *          if (p1.library[player, i, 0, 0] != 0)
     *          {
     *              continue;
     *          }//カードがあるなら次を探査
     *          else
     *          {
     *              p1.library[player, i, 0, 0] = p1.library[player, 0, 0, 0];
     *              p1.library[player, 0, 0, 0] = 0;
     *              break;
     *          }
     *      }
     *      for (int j = 0; j < BLOCKTYPE_NUM + 1; j++)
     *      {
     *          p1.library[player, i, 1, j] = card[p1.library[player, i, 0, 0]].cardCost[j];
     *      }//カードのコスト
     *  }
     * }
     *
     */


    // Use this for initialization
    void Start()
    {
        p1 = GetComponent <PuzzleSceneManager>();
        CardList();
        LoadDeckList();
    }