Exemplo n.º 1
0
        private void OnUnitDeathTime(MobaMessage msg)
        {
            ParamUnitDeathTime paramUnitDeathTime = msg.Param as ParamUnitDeathTime;

            if (paramUnitDeathTime.uniqueId == this.player.unique_id)
            {
                this.cMgr.StartCoroutine(this.Timer(paramUnitDeathTime.uniqueId, paramUnitDeathTime.reliveTime), true);
            }
        }
Exemplo n.º 2
0
    private void OnUnitDeathTime(MobaMessage msg)
    {
        ParamUnitDeathTime paramUnitDeathTime = msg.Param as ParamUnitDeathTime;

        if (paramUnitDeathTime.uniqueId == this.player.unique_id)
        {
            this.liveTime       = Time.realtimeSinceStartup + paramUnitDeathTime.reliveTime;
            this.liveTimeLength = paramUnitDeathTime.reliveTime;
        }
    }
        private void DoUnitDead(MobaMessage msg)
        {
            ParamUnitDeathTime paramUnitDeathTime = msg.Param as ParamUnitDeathTime;
            int   uniqueId   = paramUnitDeathTime.uniqueId;
            float reliveTime = paramUnitDeathTime.reliveTime;
            Units unit       = MapManager.Instance.GetUnit(uniqueId);

            if (unit.isEnemy && !this._deadEnemy.Contains(unit.npc_id) && !unit.MirrorState)
            {
                this._deadEnemy.Add(unit.npc_id);
                this.cMgr.StartCoroutine(this.AddDeathTimer(uniqueId, unit.npc_id, reliveTime), true);
            }
        }