Example #1
0
 public MailManager(EntityMyself _myself)
 {
     myself = _myself;
     //AddListeners();
     //
     MailInfoReq();
 }
Example #2
0
        public TaskManager(EntityMyself owner, int taskMain)
        {
            theOwner = owner;
            InitAvatarTaskList(taskMain);

            AddListeners();
        }
Example #3
0
 public BodyEnhanceManager(EntityMyself _myself)
 {
     Instance = this;
     myself   = _myself;
     InitEnhanceData();
     myself.RpcCall("BodyEnhaLevReq");
     AddListener();
 }
Example #4
0
    /// <summary>
    /// 添加一个新的精灵
    /// </summary>
    /// <param name="type"></param>
    public static void AddNewEntity(SpriteType type, EntityServerInfo info = null)
    {
        if (info == null)
        {
            info = new EntityServerInfo();
        }
        EntityParent entity = null;

        switch (type)
        {
        case SpriteType.NONE:

            break;

        case SpriteType.Myself:
            if (thePlayer == null)
            {
                entity        = new EntityMyself();
                info.id       = 1000;
                info.dataId   = 1;
                info.position = Vector3.zero;
                info.x        = 100;
                info.y        = 100;
            }
            else
            {
                info.id       = 1000;
                info.position = Vector3.zero;
                info.x        = 100;
                info.y        = 100;
                thePlayer.SetEntityServerInfo(info);
                thePlayer.UpdatePosition();
                return;
            }

            break;

        case SpriteType.Player:
            entity = new EntityPlayer();
            break;

        case SpriteType.Monster:
            entity = new EntityMonster();
            break;

        default:
            break;
        }
        if (entity == null)
        {
            return;
        }
        entity.SetEntityServerInfo(info);
        entity.CreateModel();
        entity.EnterWorld();
        OnEnterWorld(entity);
    }
Example #5
0
    }                                 //下一次重置时间
    #endregion

    #region 必要函数
    public FriendManager(EntityMyself _myself)
    {
        myself = _myself;
        AddListeners();
        //进入游戏的时候申请好友信息,add by Win.J H
        ReqFriendList();
        FriendReqListReq();
        Instance = this;
    }
Example #6
0
    public DailyEventSystem(EntityMyself owner)
    {
        theOwner             = owner;
        dailyEventSourceData = new Dictionary <int, DailyEventMessageData>();
        dailyEventData       = new List <KeyValuePair <int, DailyEventMessageData> >();

        AddListeners();

        GetDailyEventData();
    }
    public void CreateMyself()
    {
        EntityParent myself = new EntityMyself();

        this.MySelf = myself as EntityMyself;
        EntityInfo info = new EntityInfo(++CreateEntityIndex, (int)EntityType.主角, 100, 10, EntityType.主角.ToString(), 0);

        myself.SetEntityInfo(info);
        myself.EnterLevel();
        this.dicCreateEntitys.Add(myself.EntityId, myself);
    }
 public PlayerSkillManager(EntityParent owner) : base(owner)
 {
     this.owner = owner as EntityMyself;
     try
     {
         InitData();
     }
     catch (Exception ex)
     {
         Debuger.LogError(ex);
     }
 }
Example #9
0
 public RuneManager(EntityMyself _myself)
 {
     Instance = this;
     m_myself = _myself;
     //初始化6个符文位
     for (int i = 0; i < BODY_LEN; i++)
     {
         BodyRune brune = new BodyRune();
         brune.posi = i;
         body.Add(brune);
     }
     AddListeners();
 }
 public void Clear()
 {
     foreach (var timerId in this.timer)
     {
         TimerManager.DelTimer(timerId);
     }
     this.timer.Clear();
     dicCreateEntitys.Clear();
     curWaveDicEntitys.Clear();
     allVisiableMonster.Clear();
     if (MySelf != null && MySelf.Transform != null)
     {
         MySelf.Clear();
     }
     MySelf            = null;
     CreateEntityIndex = 0;
     WaveEntityIndex   = 0;
     this.AllDuration  = 0;
 }
Example #11
0
    // 协议处理函数
    static private void OnEntityAttached(BaseAttachedInfo baseInfo)
    {
        if (baseInfo.entity == null)
        {
            LoggerHelper.Error("Entity Attach Error.");
            return;
        }
        switch (baseInfo.entity.Name)
        {
        case "Avatar":
        {
            if (MogoWorld.thePlayer == null)
            {
                thePlayer = new EntityMyself();
            }
            //UnityLog.Sys("MySelfAttribute: "+ObjectDumper.Dump(baseInfo));
            thePlayer.SetEntityInfo(baseInfo);
            thePlayer.entity = baseInfo.entity;
            if (IsSingleMatch)
            {
                StartSingleMatch();
            }
            else
            {
                StartMatch();
            }
            TimerHeap.AddTimer(1000, 1000, () =>
                {
                    MogoWorld.thePlayer.RpcCall("HeartBeat");
                });
            break;
        }

        default:
            break;
        }
    }
Example #12
0
    public OccupyTowerSystem(EntityMyself onwer)
    {
        theOwner = onwer;

        AddListeners();
    }
Example #13
0
 public ElfSystem()
 {
     m_myself = MogoWorld.thePlayer;
     AddListeners();
 }
Example #14
0
 public ArenaManager(EntityMyself _myself)
 {
     m_myself = _myself;
     AddListeners();
 }
Example #15
0
 public WingManager(EntityMyself owner)
 {
     m_self = owner;
     AddListeners();
     //UpdateWing(m_self.wingBag);
 }
Example #16
0
 public RankManager(EntityMyself owner)
 {
     Instance = this;
     theOwner = owner;
     AddListeners();
 }
 public SanctuaryManager(EntityMyself _myself)
 {
     m_myself = _myself;
     AddListeners();
 }
Example #18
0
    private int version = 0; //未取数据

    public MarketManager(EntityMyself theOwner)
    {
        m_myself = theOwner;
        AddListeners();
    }
    /// <summary>
    /// 更新主角信息
    /// </summary>
    /// <param name="myself"></param>
    public void UpdateRole(EntityMyself myself)
    {
        //概要界面
        string expString    = myself.exp + "/" + myself.nextLevelExp;
        string energyString = myself.energy + "/" + myself.maxEnergy;

        SetPlayerName(myself.name);
        SetPlayerLevel(myself.level);

        MenuUIViewManager.Instance.SetPlayerInfoPower(myself.fightForce);

        MenuUIViewManager.Instance.SetPlayerInfoExp(myself.PercentageExp);
        MenuUIViewManager.Instance.SetPlayerInfoEnergy(myself.PercentageEnergy);
        MenuUIViewManager.Instance.SetPlayerInfoExpNum(expString);
        MenuUIViewManager.Instance.SetPlayerInfoEnergyNum(energyString);

        MenuUIViewManager.Instance.SetPlayerInfoJob(LanguageData.dataMap[(int)MogoWorld.thePlayer.vocation].content);

        //MenuUIViewManager.Instance.SetPlayerInfoHealth((int)myself.GetDoubleAttr(BattleAttr.HEALTH));
        //MenuUIViewManager.Instance.SetPlayerInfoDamage((int)myself.GetDoubleAttr(BattleAttr.Attack));
        //MenuUIViewManager.Instance.SetPlayerInfoDefense((int)myself.GetDoubleAttr(BattleAttr.DEFENSE));

        MenuUIViewManager.Instance.SetPlayerInfoHealth(myself.curHp);
        MenuUIViewManager.Instance.SetPlayerInfoAttack(myself.atk);
        MenuUIViewManager.Instance.SetPlayerInfoDefense(myself.def);

        //详细界面
        //MenuUIViewManager.Instance.SetPlayerDetailAttack((int)myself.GetDoubleAttr(BattleAttr.Attack));
        //MenuUIViewManager.Instance.SetPlayerDetailDefense((int)myself.GetDoubleAttr(BattleAttr.DEFENSE));
        //MenuUIViewManager.Instance.SetPlayerDetailHit((int)myself.GetDoubleAttr(BattleAttr.HIT));
        //MenuUIViewManager.Instance.SetPlayerDetailHealth((int)myself.GetDoubleAttr(BattleAttr.HEALTH));
        //MenuUIViewManager.Instance.SetPlayerDetailCrit((int)myself.GetDoubleAttr(BattleAttr.CRIT));
        //MenuUIViewManager.Instance.SetPlayerDetailAntiCrit((int)myself.GetDoubleAttr(BattleAttr.ANTI_CRIT));
        //MenuUIViewManager.Instance.SetPlayerDetailTrueStrike((int)myself.GetDoubleAttr(BattleAttr.TRUE_STRIKE));
        //MenuUIViewManager.Instance.SetPlayerDetailAntiTrueStrike((int)myself.GetDoubleAttr(BattleAttr.TRUE_STRIKE_RESISTANCE));
        //MenuUIViewManager.Instance.SetPlayerDetailAntiDefense((int)myself.GetDoubleAttr(BattleAttr.ANTI_DEFENSE));
        //MenuUIViewManager.Instance.SetPlayerDetailCritExtraAttack((int)myself.GetDoubleAttr(BattleAttr.CRIT_EXTRA_ATTACK));
        //MenuUIViewManager.Instance.SetPlayerDetailPVPAddition((int)myself.GetDoubleAttr(BattleAttr.PVP_ADDITION));
        //MenuUIViewManager.Instance.SetPlayerDetailPVE((int)myself.GetDoubleAttr(BattleAttr.PVP_ANTI));
        //MenuUIViewManager.Instance.SetPlayerDetailCDReduce((int)myself.GetDoubleAttr(BattleAttr.CD_REDUCE));
        //MenuUIViewManager.Instance.SetPlayerDetailSpeedAddRate((int)myself.GetDoubleAttr(BattleAttr.SPEED_ADD_RATE));

        //MenuUIViewManager.Instance.SetPlayerDetailEarthDamage((int)myself.GetDoubleAttr(BattleAttr.EARTH_DAMAGE));
        //MenuUIViewManager.Instance.SetPlayerDetailFireDamage((int)myself.GetDoubleAttr(BattleAttr.FIRE_DAMAGE));
        //MenuUIViewManager.Instance.SetPlayerDetailWaterDamage((int)myself.GetDoubleAttr(BattleAttr.WATER_DAMAGE));
        //MenuUIViewManager.Instance.SetPlayerDetailWindDamage((int)myself.GetDoubleAttr(BattleAttr.AIR_DAMAGE));
        //MenuUIViewManager.Instance.SetPlayerDetailAllElementsDamage((int)myself.GetDoubleAttr(BattleAttr.ALL_ELEMENTS_DAMAGE));

        //MenuUIViewManager.Instance.SetPlayerDetailEarthDefense((int)myself.GetDoubleAttr(BattleAttr.EARTH_DEFENSE));
        //MenuUIViewManager.Instance.SetPlayerDetailFireDefense((int)myself.GetDoubleAttr(BattleAttr.FIRE_DEFENSE));
        //MenuUIViewManager.Instance.SetPlayerDetailWaterDefense((int)myself.GetDoubleAttr(BattleAttr.WATER_DEFENSE));
        //MenuUIViewManager.Instance.SetPlayerDetailWindDefense((int)myself.GetDoubleAttr(BattleAttr.AIR_DEFENSE));
        //MenuUIViewManager.Instance.SetPlayerAllElementsDefense((int)myself.GetDoubleAttr(BattleAttr.ALL_ELEMENTS_DEFENSE));

        MenuUIViewManager.Instance.SetPlayerDetailAttack(myself.atk);
        MenuUIViewManager.Instance.SetPlayerDetailDefense(myself.def);
        MenuUIViewManager.Instance.SetPlayerDetailHit(myself.hit);
        MenuUIViewManager.Instance.SetPlayerDetailHealth(myself.curHp);
        MenuUIViewManager.Instance.SetPlayerDetailCrit(myself.crit);
        MenuUIViewManager.Instance.SetPlayerDetailAntiCrit(myself.antiCrit);
        MenuUIViewManager.Instance.SetPlayerDetailTrueStrike(myself.trueStrike);
        MenuUIViewManager.Instance.SetPlayerDetailAntiTrueStrike(myself.antiTrueStrike);
        MenuUIViewManager.Instance.SetPlayerDetailAntiDefense(myself.antiDefense);
        MenuUIViewManager.Instance.SetPlayerDetailCritExtraAttack(myself.critExtraAttack);
        MenuUIViewManager.Instance.SetPlayerDetailPVPAddition(myself.pvpAddition);
        MenuUIViewManager.Instance.SetPlayerDetailPVE(myself.pvpAnti);
        MenuUIViewManager.Instance.SetPlayerDetailCDReduce(myself.cdReduce);
        MenuUIViewManager.Instance.SetPlayerDetailSpeedAddRate(myself.speedAddRate);

        MenuUIViewManager.Instance.SetPlayerDetailEarthDamage(myself.earthDamage);
        MenuUIViewManager.Instance.SetPlayerDetailFireDamage(myself.fireDamage);
        MenuUIViewManager.Instance.SetPlayerDetailWaterDamage(myself.waterDamage);
        MenuUIViewManager.Instance.SetPlayerDetailWindDamage(myself.airDamage);
        MenuUIViewManager.Instance.SetPlayerDetailAllElementsDamage(myself.allElementsDamage);

        MenuUIViewManager.Instance.SetPlayerDetailEarthDefense(myself.earthDefense);
        MenuUIViewManager.Instance.SetPlayerDetailFireDefense(myself.fireDefense);
        MenuUIViewManager.Instance.SetPlayerDetailWaterDefense(myself.waterDefense);
        MenuUIViewManager.Instance.SetPlayerDetailWindDefense(myself.airDefense);
        MenuUIViewManager.Instance.SetPlayerAllElementsDefense(myself.allElementsDefense);
    }
Example #20
0
    public TongManager(EntityMyself _myself)
    {
        myself = _myself;

        TongUILogicManager.Instance.Initialize();
    }
Example #21
0
 public TowerManager(EntityMyself _myself)
 {
     m_myself = _myself;
     AddListeners();
 }
Example #22
0
 public RewardManager(EntityMyself self)
 {
     m_self = self;
     AddListeners();
 }