예제 #1
0
 private void OnTriggerEnter(Collider other)
 {
     if (other.tag == "Player" && playersJumping.Contains(other.transform.parent.gameObject) && haveSnowBoard)
     {
         StatsAndAchievements.UnlockAchievement(Achievement.ACH_XMAS_SKI_LAND);
     }
 }
 public override void Process()
 {
     if (input.value >= 0.5f && !AchievementNoCrane.usedCrane && App.instance.startedCheckpoint != 11)
     {
         StatsAndAchievements.UnlockAchievement(Achievement.ACH_STEAM_WALK_THE_PLANK);
     }
 }
예제 #3
0
 public void OnTriggerEnter(Collider other)
 {
     if (other.tag == "Player")
     {
         StatsAndAchievements.UnlockAchievement(Achievement.ACH_XMAS_SNOWMAN_HAT);
     }
 }
예제 #4
0
        public static bool Refresh(PowerOutlet component)
        {
            CircuitConnector forwardConnector = component.forwardConnector;

            if (!IsCircuitClosed(forwardConnector))
            {
                StopCurrent(forwardConnector);
                return(true);
            }
            float num = CalculateI(forwardConnector);

            if (Mathf.Abs(num) > 100f)
            {
                StatsAndAchievements.UnlockAchievement(Achievement.ACH_POWER_SHORT_CIRCUIT);
                StopCurrent(forwardConnector);
                return(false);
            }
            RunCurrent(forwardConnector, num);
            if (!IsCircuitClosed(forwardConnector))
            {
                StopCurrent(forwardConnector);
                return(true);
            }
            num = CalculateI(forwardConnector);
            if (Mathf.Abs(num) > 100f)
            {
                StatsAndAchievements.UnlockAchievement(Achievement.ACH_POWER_SHORT_CIRCUIT);
                StopCurrent(forwardConnector);
                return(false);
            }
            return(true);
        }
예제 #5
0
 public void OnTriggerEnter(Collider other)
 {
     if (other == battery)
     {
         StatsAndAchievements.UnlockAchievement(Achievement.ACH_POWER_STATUE_BATTERY);
     }
 }
예제 #6
0
 public void OnTriggerEnter(Collider other)
 {
     if (other == boat)
     {
         StatsAndAchievements.UnlockAchievement(Achievement.ACH_WATER_ROW_BOAT);
     }
 }
예제 #7
0
    public IEnumerator PassLevel()
    {
        currentLevel.CompleteLevel();
        if (NetGame.isLocal)
        {
            GameSave.PassCheckpointCampaign((uint)currentLevelNumber, 0, 0);
        }
        if (GameIsCompleted())
        {
            if (singleRun)
            {
                StatsAndAchievements.UnlockAchievement(Achievement.ACH_SINGLE_RUN);
            }
            if (NetGame.isLocal)
            {
                GameSave.CompleteGame(levelCount);
            }
            yield return(null);

            App.instance.StartNextLevel((uint)levelCount, 0);
        }
        else
        {
            int nextLevel = GetNextLevel(currentLevelNumber);
            if (NetGame.isLocal)
            {
                GameSave.PassCheckpointCampaign((uint)nextLevel, 0, 0);
            }
            yield return(null);

            App.instance.StartNextLevel((uint)nextLevel, 0);
        }
        StatsAndAchievements.Save();
    }
예제 #8
0
 public void OnCollisionEnter(Collision collision)
 {
     if (collision.gameObject.name.Contains("Rock") && (collision.impulse.magnitude > impulseThreshold || collision.rigidbody.velocity.magnitude > velocityThreshold))
     {
         StatsAndAchievements.UnlockAchievement(Achievement.ACH_SIEGE_BELL);
     }
 }
예제 #9
0
 public void OnTriggerEnter(Collider other)
 {
     if (other.tag == "Player")
     {
         StatsAndAchievements.UnlockAchievement(Achievement.ACH_INTRO_STATUE_HEAD);
     }
 }
    private void Update()
    {
        Bounds bounds = boxes[0].bounds;

        for (int i = 1; i < boxes.Length; i++)
        {
            bounds.Encapsulate(boxes[i].bounds);
        }
        Vector3 size = bounds.size;

        if (size.x <= limit)
        {
            Vector3 size2 = bounds.size;
            if (size2.z <= limit)
            {
                if (!currentlyStacked)
                {
                    StatsAndAchievements.UnlockAchievement(Achievement.ACH_CARRY_BIG_STACK);
                }
                currentlyStacked = true;
                return;
            }
        }
        currentlyStacked = false;
    }
예제 #11
0
 public void OnTriggerEnter(Collider other)
 {
     if (other == ship && Vector3.Dot(other.transform.up, base.transform.forward) > 0f)
     {
         StatsAndAchievements.UnlockAchievement(Achievement.ACH_WATER_REVERSE_GEAR);
     }
 }
예제 #12
0
 private void UnlockAchievements()
 {
     foreach (Achievement ach in Enum.GetValues(typeof(Achievement)))
     {
         StatsAndAchievements.UnlockAchievement(ach, false, -1);
     }
 }
 public void OnTriggerEnter(Collider other)
 {
     if (other.tag == "Player")
     {
         StatsAndAchievements.UnlockAchievement(Achievement.ACH_AZTEC_OVERLOOK);
     }
 }
 public void OnFryMeToTheMoonAchievementCheck(GameObject objectToBeGrabbing)
 {
     if (objectToBeGrabbing != null && GrabManager.IsGrabbedAny(objectToBeGrabbing))
     {
         Debug.Log("FRY ME TO THE MOON ACHIEVEMENT COMPLETE");
         StatsAndAchievements.UnlockAchievement(Achievement.ACH_HALLOWEEN_FRY_ME_TO_THE_MOON);
     }
 }
예제 #15
0
 public override void Process()
 {
     base.Process();
     if (input.value > 0.5f)
     {
         StatsAndAchievements.UnlockAchievement(achievementToUnlock);
     }
 }
예제 #16
0
 public void OnTriggerEnter(Collider other)
 {
     if (other.tag == "Player" && !achieved)
     {
         achieved = true;
         StatsAndAchievements.UnlockAchievement(Achievement.ACH_SIEGE_ZIPLINE);
     }
 }
예제 #17
0
 public void OnTriggerEnter(Collider other)
 {
     if (other.gameObject.name == "Angel" && !achieved)
     {
         achieved = true;
         StatsAndAchievements.UnlockAchievement(Achievement.ACH_XMAS_ANGEL_FALL);
     }
 }
예제 #18
0
 private void UnlockAchievements()
 {
     StatsAndAchievements.UnlockAchievement(Achievement.ACH_AZTEC_CLOCWORK, false, -1);
     StatsAndAchievements.UnlockAchievement(Achievement.ACH_AZTEC_INDIANA, false, -1);
     StatsAndAchievements.UnlockAchievement(Achievement.ACH_AZTEC_OVERLOOK, false, -1);
     StatsAndAchievements.UnlockAchievement(Achievement.ACH_BREAK_BARE_HANDS, false, -1);
     StatsAndAchievements.UnlockAchievement(Achievement.ACH_BREAK_SURPRISE, false, -1);
     StatsAndAchievements.UnlockAchievement(Achievement.ACH_BREAK_WINDOW_SHORTCUT, false, -1);
     StatsAndAchievements.UnlockAchievement(Achievement.ACH_CARRY_1000M, false, -1);
     StatsAndAchievements.UnlockAchievement(Achievement.ACH_CARRY_BIG_STACK, false, -1);
     StatsAndAchievements.UnlockAchievement(Achievement.ACH_CARRY_JAM_DOOR, false, -1);
     StatsAndAchievements.UnlockAchievement(Achievement.ACH_CLIMB_100M, false, -1);
     StatsAndAchievements.UnlockAchievement(Achievement.ACH_CLIMB_GEMS, false, -1);
     StatsAndAchievements.UnlockAchievement(Achievement.ACH_CLIMB_ROPE, false, -1);
     StatsAndAchievements.UnlockAchievement(Achievement.ACH_CLIMB_SPEAKERS, false, -1);
     StatsAndAchievements.UnlockAchievement(Achievement.ACH_DRIVE_1000M, false, -1);
     StatsAndAchievements.UnlockAchievement(Achievement.ACH_DROWN_10, false, -1);
     StatsAndAchievements.UnlockAchievement(Achievement.ACH_DUMPSTER_50M, false, -1);
     StatsAndAchievements.UnlockAchievement(Achievement.ACH_FALL_1, false, -1);
     StatsAndAchievements.UnlockAchievement(Achievement.ACH_FALL_1000, false, -1);
     StatsAndAchievements.UnlockAchievement(Achievement.ACH_HALLOWEEN_FRY_ME_TO_THE_MOON, false, -1);
     StatsAndAchievements.UnlockAchievement(Achievement.ACH_HALLOWEEN_LIKE_CLOCKWORK, false, -1);
     StatsAndAchievements.UnlockAchievement(Achievement.ACH_HALLOWEEN_PLANKS_NO_THANKS, false, -1);
     StatsAndAchievements.UnlockAchievement(Achievement.ACH_INTRO_JUMP_GAP, false, -1);
     StatsAndAchievements.UnlockAchievement(Achievement.ACH_INTRO_STATUE_HEAD, false, -1);
     StatsAndAchievements.UnlockAchievement(Achievement.ACH_JUMP_1000, false, -1);
     StatsAndAchievements.UnlockAchievement(Achievement.ACH_LVL_AZTEC, false, -1);
     StatsAndAchievements.UnlockAchievement(Achievement.ACH_LVL_BREAK, false, -1);
     StatsAndAchievements.UnlockAchievement(Achievement.ACH_LVL_CARRY, false, -1);
     StatsAndAchievements.UnlockAchievement(Achievement.ACH_LVL_CLIMB, false, -1);
     StatsAndAchievements.UnlockAchievement(Achievement.ACH_LVL_HALLOWEEN, false, -1);
     StatsAndAchievements.UnlockAchievement(Achievement.ACH_LVL_INTRO, false, -1);
     StatsAndAchievements.UnlockAchievement(Achievement.ACH_LVL_POWER, false, -1);
     StatsAndAchievements.UnlockAchievement(Achievement.ACH_LVL_PUSH, false, -1);
     StatsAndAchievements.UnlockAchievement(Achievement.ACH_LVL_RIVER_FEET, false, -1);
     StatsAndAchievements.UnlockAchievement(Achievement.ACH_LVL_RIVER_HEAD, false, -1);
     StatsAndAchievements.UnlockAchievement(Achievement.ACH_LVL_SIEGE, false, -1);
     StatsAndAchievements.UnlockAchievement(Achievement.ACH_POWER_3VOLTS, false, -1);
     StatsAndAchievements.UnlockAchievement(Achievement.ACH_POWER_COAL_DELIVER, false, -1);
     StatsAndAchievements.UnlockAchievement(Achievement.ACH_POWER_SHORT_CIRCUIT, false, -1);
     StatsAndAchievements.UnlockAchievement(Achievement.ACH_POWER_STATUE_BATTERY, false, -1);
     StatsAndAchievements.UnlockAchievement(Achievement.ACH_PUSH_BENCH_ALIGN, false, -1);
     StatsAndAchievements.UnlockAchievement(Achievement.ACH_PUSH_CLEAN_DEBRIS, false, -1);
     StatsAndAchievements.UnlockAchievement(Achievement.ACH_SHIP_1000M, false, -1);
     StatsAndAchievements.UnlockAchievement(Achievement.ACH_SIEGE_ASSASIN, false, -1);
     StatsAndAchievements.UnlockAchievement(Achievement.ACH_SIEGE_BELL, false, -1);
     StatsAndAchievements.UnlockAchievement(Achievement.ACH_SIEGE_HUMAN_CANNON, false, -1);
     StatsAndAchievements.UnlockAchievement(Achievement.ACH_SIEGE_ZIPLINE, false, -1);
     StatsAndAchievements.UnlockAchievement(Achievement.ACH_SINGLE_RUN, false, -1);
     StatsAndAchievements.UnlockAchievement(Achievement.ACH_TRAVEL_100KM, false, -1);
     StatsAndAchievements.UnlockAchievement(Achievement.ACH_TRAVEL_10KM, false, -1);
     StatsAndAchievements.UnlockAchievement(Achievement.ACH_TRAVEL_1KM, false, -1);
     StatsAndAchievements.UnlockAchievement(Achievement.ACH_WATER_ALMOST_DROWN, false, -1);
     StatsAndAchievements.UnlockAchievement(Achievement.ACH_WATER_LIGHTHOUSE, false, -1);
     StatsAndAchievements.UnlockAchievement(Achievement.ACH_WATER_REVERSE_GEAR, false, -1);
     StatsAndAchievements.UnlockAchievement(Achievement.ACH_WATER_ROW_BOAT, false, -1);
     StatsAndAchievements.UnlockAchievement(Achievement.ACH_WATER_SURF, false, -1);
 }
예제 #19
0
 private void ExitWater(bool drown)
 {
     if (diveTime < drownTime && diveTime > drownTime * 0.95f)
     {
         StatsAndAchievements.UnlockAchievement(Achievement.ACH_WATER_ALMOST_DROWN);
     }
     diveTime   = 0f;
     nextBubble = 1f;
     ApplyUnderwaterState(drown ? 2u : 0u);
 }
예제 #20
0
 public void OnTriggerExit(Collider other)
 {
     if (speakersInside.Contains(other))
     {
         speakersInside.Remove(other);
         if (speakersInside.Count == 0)
         {
             StatsAndAchievements.UnlockAchievement(Achievement.ACH_CLIMB_SPEAKERS);
         }
     }
 }
 public void OnTriggerExit(Collider other)
 {
     if (other == trackedHuman)
     {
         Vector3 vector = base.transform.InverseTransformPoint(other.transform.position);
         if (vector.x * entryX < 0f)
         {
             StatsAndAchievements.UnlockAchievement(Achievement.ACH_CARRY_JAM_DOOR);
         }
     }
 }
예제 #22
0
 public void OnTriggerEnter(Collider other)
 {
     if (other.name.Contains("Debris") && !stonesInside.Contains(other))
     {
         stonesInside.Add(other);
         if (stonesInside.Count == piecesToUnlock)
         {
             StatsAndAchievements.UnlockAchievement(Achievement.ACH_PUSH_CLEAN_DEBRIS);
         }
     }
 }
예제 #23
0
 public void OnTriggerEnter(Collider other)
 {
     if (!delivered.Contains(other) && other.transform.IsChildOf(validCoalParent))
     {
         delivered.Add(other);
         if (delivered.Count == piecesToDeliver)
         {
             StatsAndAchievements.UnlockAchievement(Achievement.ACH_POWER_COAL_DELIVER);
         }
     }
 }
 public void OnTriggerExit(Collider other)
 {
     if (other == trackedCollider)
     {
         Vector3 vector = base.transform.InverseTransformPoint(other.transform.position);
         if (vector.x * entryX < 0f)
         {
             StatsAndAchievements.UnlockAchievement(Achievement.ACH_BREAK_WINDOW_SHORTCUT);
         }
         trackedCollider = null;
     }
 }
예제 #25
0
 public void RunCurrent(float I)
 {
     if (ignorePhase)
     {
         I = Mathf.Abs(I);
     }
     output.SetValue(I / resistance);
     if (Mathf.Abs(output.value) > 2.5f)
     {
         StatsAndAchievements.UnlockAchievement(Achievement.ACH_POWER_3VOLTS);
     }
     current = I;
 }
예제 #26
0
 public void TriggerVolumeEntered(Human human)
 {
     for (int i = 0; i < grabbingHumans.Count; i++)
     {
         if (grabbingHumans[i] == human)
         {
             spinCount[i]++;
             if (spinCount[i] == spinsRequired)
             {
                 StatsAndAchievements.UnlockAchievement(Achievement.ACH_STEAM_GET_DIZZY);
             }
         }
     }
 }
예제 #27
0
 public void OnTriggerEnter(Collider other)
 {
     if (!failed)
     {
         foreach (Human item in Human.all)
         {
             if (item.GetComponent <Collider>() == other)
             {
                 StatsAndAchievements.UnlockAchievement(Achievement.ACH_ICE_NO_ICE_BABY);
                 break;
             }
         }
     }
 }
 public void Update()
 {
     if (NetGame.isClient || isCancelled)
     {
         return;
     }
     for (int i = 0; i < walls.Length; i++)
     {
         if (!walls[i].shattered)
         {
             return;
         }
     }
     StatsAndAchievements.UnlockAchievement(Achievement.ACH_BREAK_BARE_HANDS);
     isCancelled = true;
 }
    private void Update()
    {
        if (awarded)
        {
            return;
        }
        Vector3 forward = base.transform.forward;

        if (forward.y > 0.97f)
        {
            Vector3 up = base.transform.up;
            if (up.x < -0.97f)
            {
                StatsAndAchievements.UnlockAchievement(Achievement.ACH_PUSH_BENCH_ALIGN);
                awarded = true;
            }
        }
    }
예제 #30
0
 public void OnTriggerEnter(Collider other)
 {
     if (other.tag == "Player")
     {
         Human   componentInParent = other.GetComponentInParent <Human>();
         Vector3 position          = componentInParent.ragdoll.partHead.transform.position;
         float   y         = position.y;
         Vector3 position2 = componentInParent.ragdoll.partHips.transform.position;
         if (y > position2.y)
         {
             StatsAndAchievements.UnlockAchievement(Achievement.ACH_LVL_RIVER_FEET);
         }
         else
         {
             StatsAndAchievements.UnlockAchievement(Achievement.ACH_LVL_RIVER_HEAD);
         }
     }
 }