Ejemplo n.º 1
0
    private void CmdkillPlayer(int id)
    {
        CmdIncrementKills();

        Player player = PlayerStructure.getInstance().getPlayer(id);

        player.health = 0;
    }
Ejemplo n.º 2
0
        private void CmdkillPlayer(int id)
        {
            //playerNetwork.CmdIncrementKills();

            Player player = PlayerStructure.getInstance().getPlayer(id);

            player.health = 0;

            //player.playerNetwork.CmdIncrementDeaths();
        }
    public static Player[] getRankings()
    {
        PlayerStructure structure = PlayerStructure.getInstance();

        Player[] liste = (Player[])structure.getListe().Clone();

        Array.Sort(liste);

        return(liste);
    }
Ejemplo n.º 4
0
    // Use this for initialization
    private void Start()
    {
        if (isServer)
        {
            id         = PlayerStructure.getInstance().addPlayer(this);
            playerName = "Player " + (id + 1);
        }
        else if (!hasAuthority)
        {
            addToPlayerStructure(id);
        }

        m_CharacterController = GetComponent <CharacterController>();
        m_Camera = this.gameObject.GetComponentInChildren <Camera>();
        m_OriginalCameraPosition = m_Camera.transform.localPosition;
        m_FovKick.Setup(m_Camera);
        m_HeadBob.Setup(m_Camera, m_StepInterval);
        m_StepCycle = 0f;
        m_NextStep  = m_StepCycle / 2f;
        m_Jumping   = false;
        m_MouseLook.Init(transform, m_Camera.transform);

        EventsManager.TriggerEvent(EventsManager.Events.somebodyDied);
    }
Ejemplo n.º 5
0
 private void addToPlayerStructure(int i)
 {
     id = i;
     PlayerStructure.getInstance().addPlayerAtId(i, this);
 }