Beispiel #1
0
    public void spawnPlayer()
    {
        var evnt = PlayerVisibilityChanged.Create(Bolt.GlobalTargets.Others);

        evnt.Player  = player.GetComponent <FirstPersonController>().GetEntity();
        evnt.Visible = true;
        evnt.Send();

        player.SetActive(true);
        player.GetComponent <FirstPersonController>().bindMouse();
        activate_ALIVE_UI();
        ArmorAndWeapons armor   = ArmorUI.GetComponent <ArmorAndWeapons>();
        Stamina         stamina = StaminaUI.GetComponent <Stamina>();
        Hearts          health  = HealthUI.GetComponent <Hearts>();
        WeaponControl   weapons = EquipmentUI.GetComponent <WeaponControl>();

        armor.resetArmor();
        stamina.resetStamina();
        health.resetHealth();
        weapons.onSpawn();
        player.transform.position = randomSpawnpoint();
    }