Esempio n. 1
0
        private void TeleportAllItemBalls()
        {
            try
            {
                if (ItemBallCollectables == null || ItemBallCollectables.Count == 0)
                {
                    return;
                }
                if (ItemBallCollectables != null)
                {
                    for (int i = 0; i < ItemBallCollectables._size; i++)
                    {
                        var obj  = ItemBallCollectables.get_Item(i);
                        var body = obj.GetComponent <Rigidbody>();
                        body.velocity = novelocity;
                        DebugLog(": Teleporting " + obj.name + " To Your location...");
                        MelonModLogger.Log(": Teleporting " + ItemBallCollectables.Count + " ItemBalls To Your location...");

                        Vector3 position = player.transform.position + player.transform.forward;
                        DebugLog("Selected position is : " + position.ToString());

                        obj.transform.position = position;
                    }
                }
            }
            catch (Exception)
            {
            }
        }
Esempio n. 2
0
 private void DecreaseItemBallSize()
 {
     try
     {
         if (ItemBallCollectables == null || ItemBallCollectables.Count == 0)
         {
             return;
         }
         if (ItemBallCollectables != null)
         {
             for (int i = 0; i < ItemBallCollectables._size; i++)
             {
                 var obj = ItemBallCollectables.get_Item(i);
                 obj.localScale = obj.localScale / 2;
             }
         }
     }
     catch (Exception)
     {
     }
 }