public void PlayGame() { player.gameObject.SetActive(true); animaLisPlatform.gameObject.SetActive(true); animaLisPlatform.enabled = true; if (animaLisPlatform.isPlaying) { animaLisPlatform.Stop(); } animaLisPlatform.Play(); dataGame.platformActive = Random.Range(0, dataGame.platform.Length); for (int i = 0; i < listPlatform.childCount; i++) { Platform platform = listPlatform.GetChild(i).GetComponent <Platform> (); platform.enabled = true; platform.SetRadius(); } cam.Start(); player.Start(); }
// Use this for initialization void Start() { // 初始化组合技能的按键方式,动作初始化参数,需要的等级信息 playerComboAttacks[0] = new Combo() // FAST Raisin Wave 浪翻 { SwordLevel = E_SwordLevel.One, ComboSteps = new ComboStep[] { new ComboStep() { AttackType = E_AttackType.X, ComboLevel = E_ComboLevel.One, Data = AnimSet.AttackData[0] }, new ComboStep() { AttackType = E_AttackType.X, ComboLevel = E_ComboLevel.One, Data = AnimSet.AttackData[1] }, new ComboStep() { AttackType = E_AttackType.X, ComboLevel = E_ComboLevel.One, Data = AnimSet.AttackData[2] }, new ComboStep() { AttackType = E_AttackType.X, ComboLevel = E_ComboLevel.Two, Data = AnimSet.AttackData[3] }, new ComboStep() { AttackType = E_AttackType.X, ComboLevel = E_ComboLevel.Three, Data = AnimSet.AttackData[4] }, } }; playerComboAttacks[1] = new Combo() // BREAK BLOCK half moon 半月 { SwordLevel = E_SwordLevel.One, ComboSteps = new ComboStep[] { new ComboStep() { AttackType = E_AttackType.O, ComboLevel = E_ComboLevel.One, Data = AnimSet.AttackData[5] }, new ComboStep() { AttackType = E_AttackType.O, ComboLevel = E_ComboLevel.One, Data = AnimSet.AttackData[6] }, new ComboStep() { AttackType = E_AttackType.O, ComboLevel = E_ComboLevel.One, Data = AnimSet.AttackData[7] }, new ComboStep() { AttackType = E_AttackType.X, ComboLevel = E_ComboLevel.Two, Data = AnimSet.AttackData[8] }, new ComboStep() { AttackType = E_AttackType.X, ComboLevel = E_ComboLevel.Three, Data = AnimSet.AttackData[9] }, } }; playerComboAttacks[2] = new Combo() // CRITICAL cloud cuttin 云切 { SwordLevel = E_SwordLevel.Two, ComboSteps = new ComboStep[] { new ComboStep() { AttackType = E_AttackType.O, ComboLevel = E_ComboLevel.One, Data = AnimSet.AttackData[5] }, new ComboStep() { AttackType = E_AttackType.O, ComboLevel = E_ComboLevel.One, Data = AnimSet.AttackData[6] }, new ComboStep() { AttackType = E_AttackType.X, ComboLevel = E_ComboLevel.One, Data = AnimSet.AttackData[17] }, new ComboStep() { AttackType = E_AttackType.O, ComboLevel = E_ComboLevel.Two, Data = AnimSet.AttackData[18] }, new ComboStep() { AttackType = E_AttackType.O, ComboLevel = E_ComboLevel.Three, Data = AnimSet.AttackData[19] }, } }; playerComboAttacks[3] = new Combo() // flying dragon 飞龙 { SwordLevel = E_SwordLevel.Three, ComboSteps = new ComboStep[] { new ComboStep() { AttackType = E_AttackType.X, ComboLevel = E_ComboLevel.One, Data = AnimSet.AttackData[0] }, new ComboStep() { AttackType = E_AttackType.O, ComboLevel = E_ComboLevel.One, Data = AnimSet.AttackData[10] }, new ComboStep() { AttackType = E_AttackType.O, ComboLevel = E_ComboLevel.One, Data = AnimSet.AttackData[11] }, new ComboStep() { AttackType = E_AttackType.X, ComboLevel = E_ComboLevel.Two, Data = AnimSet.AttackData[12] }, new ComboStep() { AttackType = E_AttackType.X, ComboLevel = E_ComboLevel.Three, Data = AnimSet.AttackData[13] }, } }; playerComboAttacks[4] = new Combo() // KNCOK //walking death 踏死 { SwordLevel = E_SwordLevel.Four, ComboSteps = new ComboStep[] { new ComboStep() { AttackType = E_AttackType.X, ComboLevel = E_ComboLevel.One, Data = AnimSet.AttackData[0] }, new ComboStep() { AttackType = E_AttackType.X, ComboLevel = E_ComboLevel.One, Data = AnimSet.AttackData[1] }, new ComboStep() { AttackType = E_AttackType.O, ComboLevel = E_ComboLevel.One, Data = AnimSet.AttackData[14] }, new ComboStep() { AttackType = E_AttackType.X, ComboLevel = E_ComboLevel.Two, Data = AnimSet.AttackData[15] }, new ComboStep() { AttackType = E_AttackType.X, ComboLevel = E_ComboLevel.Three, Data = AnimSet.AttackData[16] }, } }; playerComboAttacks[5] = new Combo() // HEAVY, AREA shogun death 破将 { SwordLevel = E_SwordLevel.Five, ComboSteps = new ComboStep[] { new ComboStep() { AttackType = E_AttackType.O, ComboLevel = E_ComboLevel.One, Data = AnimSet.AttackData[5] }, new ComboStep() { AttackType = E_AttackType.X, ComboLevel = E_ComboLevel.One, Data = AnimSet.AttackData[20] }, new ComboStep() { AttackType = E_AttackType.O, ComboLevel = E_ComboLevel.One, Data = AnimSet.AttackData[21] }, new ComboStep() { AttackType = E_AttackType.X, ComboLevel = E_ComboLevel.Two, Data = AnimSet.AttackData[22] }, new ComboStep() { AttackType = E_AttackType.O, ComboLevel = E_ComboLevel.Three, Data = AnimSet.AttackData[23] }, } }; // 玩家信息初始化 Owner.BlackBoard.IsPlayer = true; Owner.BlackBoard.Rage = 0; Owner.BlackBoard.Dodge = 0; Owner.BlackBoard.Fear = 0; Owner.BlackBoard.Health = Owner.BlackBoard.MaxHealth; Owner.BlackBoard.ActionHandlerAdd(this); control.Start(); }