public void InitLight() { // 暂时取第一束 for (int i = 0; i < 1; ++i) { GameObject light = Instantiate(ResourcesTools.getLight(1)); LightManager lightMgr = light.GetComponent <LightManager>(); lightMgr.Init(RoomData.room.Speed, RoomData.room.Count, RoomData.room.Lights[i].X, RoomData.room.Lights[i].Z); lights.Add(light); } }
public override void onSkill() { AnimationControl anim = GetComponent <AnimationControl>(); anim.Attack(); if (RoomData.isMainRole(playerAttribute.seat)) { FightScene.instance.audioController.SoundPlay(AudioEunm.attack); } GameObject light = Instantiate(ResourcesTools.getLight(1)); LightManager lightMgr = light.GetComponent <LightManager>(); float speed = ((RoomData.room.Speed + playerAttribute.bounces * speedCoeff) > lightMgr.speedRange[lightMgr.speedRange.Length - 1]) ? lightMgr.speedRange[lightMgr.speedRange.Length - 1] : (RoomData.room.Speed + playerAttribute.bounces * speedCoeff); lightMgr.Init(speed, RoomData.room.Count, gameObject); FightScene.instance.Lights.Add(light); }