예제 #1
0
        private void TeleportAllCapsules()
        {
            try
            {
                if (CapsuleCollectables == null || CapsuleCollectables.Count == 0)
                {
                    MelonModLogger.Log("No Capsules Detected!");
                    return;
                }
                if (CapsuleCollectables != null)
                {
                    for (int i = 0; i < CapsuleCollectables._size; i++)
                    {
                        var obj  = CapsuleCollectables.get_Item(i);
                        var body = obj.GetComponent <Rigidbody>();
                        body.velocity = novelocity;
                        DebugLog(": Teleporting " + obj.name + " To Your location...");
                        MelonModLogger.Log(": Teleporting " + CapsuleCollectables.Count + " Capsules To Your location...");

                        Vector3 position = player.transform.position + player.transform.forward;
                        DebugLog("Selected position is : " + position.ToString());
                        obj.transform.position = position;
                    }
                }
            }
            catch (Exception)
            {
            }
        }
예제 #2
0
 private void DecreaseCapsuleSize()
 {
     try
     {
         if (CapsuleCollectables == null || CapsuleCollectables.Count == 0)
         {
             return;
         }
         if (CapsuleCollectables != null)
         {
             for (int i = 0; i < CapsuleCollectables._size; i++)
             {
                 var obj = CapsuleCollectables.get_Item(i);
                 obj.localScale = obj.localScale / 2;
             }
         }
     }
     catch (Exception)
     {
     }
 }