コード例 #1
0
ファイル: Skill300002.cs プロジェクト: LiuFeng1011/Diablo
    public override void SkillInit(InGameBaseCharacter source, InGameBaseCharacter target)
    {
        base.SkillInit(source, target);

        additionPos = new Vector3(0, source.boxSize.y / 2, 0);
        Vector3 sourcePos = source.transform.position + additionPos;
        Vector3 targetPos = target.transform.position + additionPos;

        moveVector         = (targetPos - sourcePos).normalized;
        moveVector.z       = 0;
        startPos           = sourcePos;
        transform.position = startPos;

        float angle = GameCommon.GetVecAngle(moveVector);

        transform.eulerAngles = new Vector3(0, 0, angle);
    }