/// <summary> /// 设置所有灯的关注对象为keyMan /// </summary> /// <param id="dm"></param> void UpdateDancerStatus(int i, DancerDataModel dm) { DancerEntity entity = utilsEntity. GetEntity <DancerEntity>(dm.gameObject); entity.isDancing = true; }
private void Update() { DancerEntity entity = utilsEntity.GetEntity <DancerEntity>(gameObject); if (entity.isDancing) { int speed = Random.Range(1, 3); transform.Rotate(Vector3.up * speed * Time.deltaTime, speed); } }