コード例 #1
0
 void DickPress(KMSelectable Dick)
 {
     Dick.AddInteractionPunch();
     Audio.PlayGameSoundAtTransform(KMSoundOverride.SoundEffect.ButtonPress, Dick.transform);
     for (int i = 0; i < 4; i++)
     {
         if (Dick == MasherTheBottun[i] && Wheufhahekfhe[i] == true)
         {
             Debug.LogFormat("[NeeDeez Nuts #{0}] Deez nuts!", moduleId);
             Audio.PlaySoundAtTransform("DeezNuts", transform);
             OnNeedyDeactivation();
             module.OnPass();
             Dick.AddInteractionPunch();
             Audio.PlayGameSoundAtTransform(KMSoundOverride.SoundEffect.ButtonPress, Dick.transform);
             for (int j = 0; j < 4; j++)
             {
                 Wheufhahekfhe[j] = false;
                 IWillBombTheAtlanticOcean[j].text = "Got Eeem!";
             }
         }
         else if (Dick == MasherTheBottun[i] && Wheufhahekfhe[i] == false)
         {
             Debug.LogFormat("[NeeDeez Nuts #{0}] Got Eeem!", moduleId);
             Audio.PlaySoundAtTransform("GOTEEE", transform);
             module.OnStrike();
             Dick.AddInteractionPunch();
             Audio.PlayGameSoundAtTransform(KMSoundOverride.SoundEffect.ButtonPress, Dick.transform);
         }
     }
 }
コード例 #2
0
 protected void OnTimerExpired()
 {
     if (active)
     {
         module.OnStrike();
         OnNeedyDeactivation();
     }
 }
コード例 #3
0
 protected void OnTimerExpired()
 {
     if (active)
     {
         Debug.LogFormat("[Rotating Squares #{0}] No buttons were pressed in time, strike!", moduleId);
         module.OnStrike();
         OnNeedyDeactivation();
     }
 }
コード例 #4
0
 protected void OnTimerExpired()
 {
     if (active)
     {
         Debug.LogFormat("[Red Light Green Light #{0}] The button was not pressed in time, strike!", moduleId);
         module.OnStrike();
         OnNeedyDeactivation();
     }
 }
コード例 #5
0
 protected void OnTimerExpired()
 {
     if (active)
     {
         module.OnStrike();
         DebugMsg("Strike! Ran out of time.");
         OnNeedyDeactivation();
     }
 }
コード例 #6
0
 protected void OnTimerExpired()
 {
     if (active)
     {
         Debug.LogFormat("[Llama, Llama, Alpaca #{0}] An option was not selected in time, strike!", moduleId);
         module.OnStrike();
         OnNeedyDeactivation();
     }
 }
コード例 #7
0
    void ApplyTetromino()
    {
        if (tetr != null)
        {
            List <IntPair> list = tetr.GetTileCoordinates();
            if (tetr.isValid())
            {
                foreach (IntPair p in list)
                {
                    GameBoard.set(p.x, p.y, 1);
                }

                List <int> rows = GameBoard.getCompletedRows();
                if (rows.Count > 0)
                {
                    GameBoard.deleteRows(rows);
                }

                piecesLeft--;
                if (piecesLeft > 0)
                {
                    tetr = new Tetromino(G_WIDTH, GameBoard, GetPiece());
                }
                else
                {
                    NeedyModule.HandlePass();
                    tetr = null;
                }
                UpdateGrid();
            }
            else
            {
                NeedyModule.OnStrike();
                NeedyModule.HandlePass();
                tetr      = null;
                GameBoard = new TetrisBoard(G_WIDTH, G_WIDTH);
                UpdateGrid();
            }
        }
    }
コード例 #8
0
 protected void OnTimerExpired()
 {
     if (active)
     {
         if (playerPosition == goalPosition)
         {
             module.OnPass();
             DebugMsg("Was on goal position when timer ran out.");
             OnNeedyDeactivation();
         }
         else
         {
             module.OnStrike();
             DebugMsg("Strike! Was not on right tile when timer ran out. Player position: " + playerPosition + ", Goal position: " + goalPosition);
             OnNeedyDeactivation();
         }
     }
 }
コード例 #9
0
    void bp(KMSelectable key)
    {
        audio.PlayGameSoundAtTransform(KMSoundOverride.SoundEffect.ButtonPress, transform);

        if (Array.IndexOf(buttons, key) == sequence[currentInt])
        {
            currentInt++;
        }
        else
        {
            needy.OnStrike();
            currentInt = 0;
        }
        if (currentInt == lenght2)
        {
            needy.OnPass();
            lights[random].enabled = false;
            addseconds            += 3;
        }
    }
コード例 #10
0
 private void strike()
 {
     module.OnStrike();
     Reset();
 }
コード例 #11
0
 void Strike()
 {
     NeedyModule.OnStrike();
 }
コード例 #12
0
 protected void OnTimerExpired()
 {
     NeedyModule.OnStrike();
     tetr = null;
     UpdateGrid();
 }
コード例 #13
0
    void FixedUpdate()
    {
        if (active)
        {
            timeOnRoad = timeOnRoad + Time.fixedDeltaTime;

            if ((int)(timeOnRoad * 81) % 81 >= 54)
            {
                roadNumber = 2;
            }
            else if ((int)(timeOnRoad * 81) % 81 >= 27)
            {
                roadNumber = 1;
            }
            else
            {
                roadNumber = 0;
            }

            if (!specialPhase)
            //transform.Rotate(Vector3.up * needy.GetNeedyTimeRemaining());
            {
                if (timeOnRoad >= 28800)                 //28800
                {
                    //Wow, you kept the bus going for eight hours!
                    score++;
                    if (score > 99)
                    {
                        score = 99;
                    }
                    specialPhase       = true;
                    roadLane.enabled   = false;
                    laneMarker.enabled = false;
                    removeDigits();
                    showSpecial();
                    needy.SetNeedyTimeRemaining(60.1f);
                    timeOnRoad = 0;
                    dashboard.material.mainTexture = dashTitleSpecial[2];
                }
                else if (needy.GetNeedyTimeRemaining() < 75.1 && roadPosition == 1)
                {
                    roadPosition = 2;
                    needy.SetNeedyTimeRemaining(75.1f);
                    sphere.transform.localPosition  = new Vector3(handlePosition(), .015f, 0);
                    roadLane.material.mainTexture   = roadPos[roadPosition];
                    laneMarker.material.mainTexture = roadNum[((roadPosition * 3) + roadNumber)];
                }
                else if (needy.GetNeedyTimeRemaining() < 30.1 && roadPosition == 2)
                {
                    GetComponent <KMAudio>().PlayGameSoundAtTransformWithRef(KMSoundOverride.SoundEffect.NeedyActivated, transform);
                    roadPosition = 3;
                    needy.SetNeedyTimeRemaining(30.1f);
                    sphere.transform.localPosition  = new Vector3(handlePosition(), .015f, 0);
                    roadLane.material.mainTexture   = roadPos[roadPosition];
                    laneMarker.material.mainTexture = roadNum[((roadPosition * 3) + roadNumber)];
                }
                doClock();
                doMiles();
                laneMarker.material.mainTexture = roadNum[((roadPosition * 3) + roadNumber)];
            }
            else
            {
                if (timeOnRoad >= 60)
                {
                    //needed to press start in 60 seconds, so you get a strike :(
                    needy.OnStrike();
                    active = false;
                    removeSpecial();
                    needy.HandlePass();
                    specialPhase = false;
                    timeOnRoad   = 0;
                }
            }
        }
    }
コード例 #14
0
 protected void OnTimerExpired()
 {
     needy.OnStrike();
     active = false;
 }