Beispiel #1
0
    public bool DeadHandle(CReadPacket packet)
    {
        Dictionary <string, object> data = packet.data;
        uint attackKeyId = uint.Parse(data["sk"].ToString());
        uint targetKeyId = uint.Parse(data["tk"].ToString());
        int  rc          = int.Parse(data["rc"].ToString());

        if (targetKeyId == 0 || targetKeyId == playerData.GetInstance().selfData.keyId)//自己死亡
        {
            CharacterManager.player.GetComponent <CharacterState>().SetDead();
            if (Singleton <SceneManage> .Instance.Current == EnumSceneID.LGhuangyuan)
            {
                if (UIDeadToReborn.GetInstance() != null)
                {
                    UIDeadToReborn.GetInstance().show();
                }
            }
        }
        else//其他人死亡
        {
            CreatePeople.GetInstance().OtherObjectDead(targetKeyId);
        }
        return(true);
    }
Beispiel #2
0
 void Start()
 {
     m_Single = this;
     Init();
 }