コード例 #1
0
    public SpellCastTransData FindProperCastingPos(Divine.Moniker owner, Character target)
    {
        if (owner == Divine.Moniker.Archer)
        {
            return(FindProperCastingPos_Archer(target));
        }
        else if (owner == Divine.Moniker.Wizard)
        {
            return(FindProperCastingPos_Wizard(target));
        }
        else if (owner == Divine.Moniker.Skeleton_Archer)
        {
            return(FindProperCastingPos_Archer(target));
        }
        else if (owner == Divine.Moniker.Kharback)
        {
            return(FindProperCastingPos_Archer(target));
        }
        else if (owner == Divine.Moniker.FereydounChakra)
        {
            return(FindProperCastingPos_ChakraFereydoun(target));
        }
        else if (owner == Divine.Moniker.Fereydoun)
        {
            return(FindProperCastingPos_Wizard(target));
        }

        DivineDebug.Log("Find proper pos doesnt support this character: " + target.moniker, DivineLogType.Error);
        return(null);
    }
コード例 #2
0
    private void NormalAttack(BtlCtrlCharacter currentSlcCharacter,
                              BtlCtrlParty[] parties,
                              Divine.Moniker targetMoniker,
                              Action <long, int, List <long> > onMove,
                              int spellIndex = 0)
    {
        int indexOfSpell        = spellIndex;
        BtlCtrlCharacter target = null;

        List <BtlCtrlCharacter> playerCharacters = parties[0].GetCharacters();

        foreach (BtlCtrlCharacter ch in playerCharacters)
        {
            if (ch.hp > 0 && ch.moniker == targetMoniker)
            {
                target = ch;
                break;
            }
        }

        if (onMove != null)
        {
            onMove(currentSlcCharacter.id, indexOfSpell, new List <long> {
                target.id
            });
        }
    }
コード例 #3
0
    //Private Method
    private CharacterVisual LoadNewCharacter(Divine.Moniker moniker)
    {
        GameObject gObj = Instantiate(PrefabProvider_Battle.instance.GetPrefab_CharVisual(moniker.ToString()));

        gObj.transform.position = new Vector3(1000, 1000, 1000);

        return(gObj.GetComponent <CharacterVisual>());
    }
コード例 #4
0
    public SkeletonGraphic GetCharacterUISpine(Divine.Moniker moniker)
    {
        SkeletonGraphic sklGraph = null;

        sklGraph = Instantiate(PrefabProvider_Menu.instance.GetPrefab_CharacterUI(
                                   moniker.ToString())
                               ).GetComponent <SkeletonGraphic>();

        CustomizeManager.instance.DoCustomize(sklGraph, moniker);

        return(sklGraph);
    }
コード例 #5
0
    //Private Methods
    private void Init(Divine.Moniker moniker, int hp, int shield, int maxHP, int maxShield, int level, Type type)
    {
        _moniker = moniker;

        _level = level;

        _type = type;

        _stats = new BattleObjStats(hp, maxHP, 0, shield, maxShield);

        _lastChangeStatInfo = new ChangeStatInfo();
    }
コード例 #6
0
    public CharacterVisual GetCharacterVisual(Divine.Moniker moniker)
    {
        CharacterVisual result = null;

        for (int i = 0; i < _characters.Count; i++)
        {
            if (_characters[i].moniker == moniker)
            {
                result = _characters[i];
                _characters.Remove(result);
                break;
            }
        }

        if (result == null)
        {
            result = LoadNewCharacter(moniker);
        }

        return(result);
    }
コード例 #7
0
    //Public Methods
    public void StartIt(Divine.Moniker moniker, MoveInfo moveInfo, int spellIndex, bool isCritical, Action endAction)
    {
        _movingEnded   = false;
        _animCompleted = false;

        _moveInfo  = moveInfo;
        _endAction = endAction;

        _startPos = transform.position;

        if (_skeletonAnim == null)
        {
            _skeletonAnim = GetComponentInChildren <SkeletonAnimation>();
        }

        string animName;

        if (!_isNewJump)
        {
            animName = _jumpAnims[0];
        }
        else
        {
            animName = !isCritical ? _jumpAnims[spellIndex] : _jumpAnim_Critical;
        }

        AudioManager.instance.PlayProperJump(moniker, spellIndex, _isNewJump, isCritical);

        Spine.TrackEntry tr = _skeletonAnim.state.SetAnimation(0, animName, false);
        if (!_isNewJump)
        {
            tr.Event    += OnJumpForward;
            tr.Complete += OnJumpComplete;
        }
        else
        {
            tr.Complete += OnNewJumpPreAnimComplete;
        }
    }
コード例 #8
0
 public void Init(Divine.Moniker moniker)
 {
     _moniker = moniker;
 }
コード例 #9
0
 public BtlCtrlCharacter(Divine.Moniker moniker, int hp, int shield, int maxHP, int MaxShield, int level, Type type)
 {
     Init(moniker, hp, shield, maxHP, MaxShield, level, type);
 }