예제 #1
0
    //生成特效
    public void SpawnEffect(string key)
    {
        GameObject effect = ResManager.Instance.LoadEffect(playerInfo.HeroID, key);

        effect.transform.position    = transform.position;
        effect.transform.eulerAngles = transform.eulerAngles;
        effect.gameObject.SetActive(true);
        EConfig            eConfig  = effect.transform.GetComponent <EConfig>();
        BattleUserInputC2S skillCMD = playerCtrl.playerFSM.skillCMD.CMD;

        //playerCtrl.OnSkillTrriger 技能触发回调 由释放者
        eConfig.Init(skillCMD.RolesID, skillCMD.LockTag, skillCMD.LockID,
                     transform.forward, transform.position, playerCtrl.OnSkillTrriger);
    }