コード例 #1
0
    BattleActor GetActor(OrderStatus isIn, int instId, COM_BattleEntityInformation babyInst)
    {
        BattleActor baby = GamePlayer.Instance.FindBabyBattleActor(instId);

        if (isIn_.Equals(OrderStatus.OS_ShouBaobao))
        {
            //如果是自己的宝宝
            if (baby != null)
            {
                //改出站状态
                GamePlayer.Instance.BabyState(instId, false);
            }
            return(Battle.Instance.GetActorByInstId(instId));
        }
        else
        {
            //如果是自己的宝宝
            if (baby != null)
            {
                pairPosition_  = Battle.Instance.GetPairPos(player_.BattlePos);
                baby.BattlePos = pairPosition_;
            }
            else //别人的宝宝
            {
                baby = new BattleActor();
                baby.SetBattlePlayer(babyInst);
                pairPosition_ = (int)babyInst.battlePosition_;
            }

            return(baby);
        }
    }
コード例 #2
0
ファイル: Entity.cs プロジェクト: heycayc/mlbb
    public COM_BattleEntityInformation RequestBattlePhoto()
    {
        COM_BattleEntityInformation bei = new COM_BattleEntityInformation();

        bei.type_     = type_;
        bei.instName_ = instName_;
        bei.instId_   = instId_;
        bei.tableId_  = GetIprop(PropertyType.PT_TableId);
        bei.assetId_  = GetIprop(PropertyType.PT_AssetId);
        bei.hpMax_    = GetIprop(PropertyType.PT_HpMax);
        bei.hpCrt_    = GetIprop(PropertyType.PT_HpCurr);
        bei.mpMax_    = GetIprop(PropertyType.PT_MpMax);
        bei.mpCrt_    = GetIprop(PropertyType.PT_MpCurr);
        bei.level_    = GetIprop(PropertyType.PT_Level);

        return(bei);
    }
コード例 #3
0
    public void Excute(BattleActor player, OrderStatus isIn, int babyinst_id, COM_BattleEntityInformation babyInst, ScaleCallBack callback)
    {
        isIn_      = isIn;
        player_    = player;
        babyInst_  = GetActor(isIn, babyinst_id, babyInst);
        call_back_ = callback;
        SkillData sd = SkillData.GetMinxiLevelData(GlobalValue.SKILL_BABYINNOUT);

        player.castAnim_ = GlobalValue.TCast;
        player.ControlEntity.SetAnimationParam(player.castAnim_, AnimatorParamType.APT_Trigger);

        if (sd._Cast_effectID != -1)
        {
            EffectAPI.Play((EFFECT_ID)sd._Cast_effectID, Battle.Instance.GetStagePointByIndex(babyInst_.BattlePos).gameObject, null, null, DoEffect);
        }
        else
        {
            DoEffect();
        }
    }
コード例 #4
0
ファイル: BattleActor.cs プロジェクト: heycayc/mlbb
 public void SetBattlePlayer(COM_BattleEntityInformation sPlayer)
 {
     battlePlayer    = sPlayer;
     gameobjectname_ = Enum.GetName(typeof(EntityType), battlePlayer.type_) + "[" + battlePlayer.instId_.ToString() + "]";
 }