コード例 #1
0
ファイル: SpawnItems.cs プロジェクト: Horsuna/server
 public static void drop(int id, int amount, string state, Vector3 position)
 {
     if (!ItemState.getMarket(id) && (ItemType.getType(id) != 7 || state != string.Empty))
     {
         position = position + new Vector3(UnityEngine.Random.Range(-0.75f, 0.75f), 0f, UnityEngine.Random.Range(-0.75f, 0.75f));
         Physics.Raycast(position + new Vector3(0f, 2f, 0f), Vector3.down, out SpawnItems.hit, 16f, RayMasks.STATIC);
         position = SpawnItems.hit.point + new Vector3(0f, 0.25f, 0f);
         SpawnItems.spawn(id, amount, state, position);
     }
 }
コード例 #2
0
ファイル: SpawnItems.cs プロジェクト: Horsuna/server
 public static void spawnItem(int id, int amount, Vector3 position)
 {
     SpawnItems.spawn(id, amount, ItemState.getState(id), position);
 }