Advertisement

Unity2D 旋转转盘(拖动左键)

阅读量:

此处所描述的技巧并非类似于抽奖活动中常见的随机旋转转盘方式,需特别注意

此处所描述的操作方式为通过持续按压鼠标左键来实现转盘的旋转

在这里插入图片描述

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

[RequireComponent(typeof(AudioSource))]
public class Rotate : MonoBehaviour
{
// Start is called before the first frame update

复制代码
    private bool isTouch = false;
    private AudioSource Player;
    public float speed = 100f;
    public AudioClip select;
    private GameObject aud;
    
    void Start()
    {
    this.Player = th

全部评论 (0)

还没有任何评论哟~