Exemplo n.º 1
0
    void TryDisplaySkill()
    {
        //播放技能
        Jyx2Skill skill  = ConfigTable.Get <Jyx2Skill>(SkillId.ToString());
        var       wugong = new WugongInstance(SkillId);

        SkillCastHelper helper = new SkillCastHelper();

        helper.Source  = player;
        helper.Targets = enemys;

        wugong.Level   = SkillLevel;
        helper.Zhaoshi = new BattleZhaoshiInstance(wugong);

        //直接在每个敌人身上受击
        List <Transform> blocks = new List <Transform>();

        foreach (var e in enemys)
        {
            blocks.Add(e.transform);
        }
        helper.CoverBlocks = blocks;

        helper.Play();
    }
Exemplo n.º 2
0
    /// <summary>
    /// 切换技能待机动作
    /// </summary>
    void SwitchSkillPose()
    {
        Jyx2Skill skill  = ConfigTable.Get <Jyx2Skill>(SkillId.ToString());
        var       wugong = new WugongInstance(SkillId);

        //切换武器和动作

        player.SwitchSkillTo(wugong);
    }
Exemplo n.º 3
0
    // Start is called before the first frame update
    void Start()
    {
        animator = GetComponent <Animator>();
        Jyx2Skill skill  = ConfigTable.Get <Jyx2Skill>(SkillId.ToString());
        var       wugong = new WugongInstance(SkillId);

        var display = wugong.GetDisplay();

        this.CurDisplay = display;

        this.Idle();
    }