示例#1
0
文件: Game.cs 项目: jamioflan/LD48
    public void DropPickup(Pickup.Type type, Vector3 pos, int count)
    {
        Pickup prefab = type == Pickup.Type.COIN ? coinPrefab : healthPrefab;

        Pickup pickup = Instantiate(prefab);

        pickup.transform.position = pos;

        pickup.count = count;
    }
示例#2
0
        public void PlayerPickup(int count, Pickup.Type type)
        {
            SoundManager.PlaySound(SoundManager.SoundEnum.Pickup);

            if (type == Pickup.Type.Score)
            {
                PlayerScore += count;
            }
            else if (type == Pickup.Type.Drill)
            {
                PlayerDrillCount += count;
            }
        }