Суббота, 27 Апреля 2024, 01:07

Приветствую Вас Гость

[ Новые сообщения · Игроделы · Правила · Поиск ]
  • Страница 1 из 2
  • 1
  • 2
  • »
Форум игроделов » Ресурсы и Примеры игр » 3D-моделирование и 3D-графика » Проблема с моделью
Проблема с моделью
AlastarДата: Четверг, 08 Августа 2013, 13:30 | Сообщение # 1
постоянный участник
Сейчас нет на сайте
Только сегодня начал моделировать и натолкнулся на такую проблему:

Это жутко мешает использовать браш, как это убрать?
Работаю в Blender


Big Boobs (+18 only!)

Сообщение отредактировал Alastar - Четверг, 08 Августа 2013, 13:36
AsteroidДата: Четверг, 08 Августа 2013, 13:43 | Сообщение # 2
Blender updated
Сейчас нет на сайте
wacko а как ты вообще так сделал ?
Для начала включи прозрачность модели,возможно тут лег полигон по верх сетки.
есле нет то лучше сделай новый приклад smile
AlastarДата: Четверг, 08 Августа 2013, 13:57 | Сообщение # 3
постоянный участник
Сейчас нет на сайте
Цитата (Asteroid)
есле нет то лучше сделай новый приклад

Делал, получилось тоже самое smile
Цитата (Asteroid)
Для начала включи прозрачность модели,возможно тут лег полигон по верх сетки.

А как? Там куча всяких вариантов прозрачности есть

Добавлено (08.08.2013, 13:57)
---------------------------------------------
Решил проблему, просто удалил эти участки и заново перерисовал)


Big Boobs (+18 only!)
AsteroidДата: Четверг, 08 Августа 2013, 14:15 | Сообщение # 4
Blender updated
Сейчас нет на сайте
можно так smile только много полигонов получится. можно заготовку субдивайсом попелить раза два.так будет экономичнее.
AlastarДата: Четверг, 08 Августа 2013, 14:29 | Сообщение # 5
постоянный участник
Сейчас нет на сайте
Asteroid, классно!

Big Boobs (+18 only!)
AsteroidДата: Пятница, 09 Августа 2013, 06:30 | Сообщение # 6
Blender updated
Сейчас нет на сайте
Alastar, Ты вроде себя кодером в С# предлогал ?. Неужели решил сменить направление занятости ?
P\S Как закончиш модель покажи.
engineer_proДата: Пятница, 09 Августа 2013, 12:04 | Сообщение # 7
постоянный участник
Сейчас нет на сайте
во 1 , если такая путаница у тебя , автоматом переходи на 3д макс, в 3д максе интерфейс дружелюбней да и проффесиональней

официальный сайт -
AlastarДата: Пятница, 09 Августа 2013, 12:15 | Сообщение # 8
постоянный участник
Сейчас нет на сайте
Asteroid, ну так, одно другому не мешает biggrin Я ведь еще и рисовать умею smile
engineer_pro, Ой да ну нафиг его, установит мне опять 10Гб какой-то фигни(которой я пользоваться не буду), а у меня каждый метр на счету)


Big Boobs (+18 only!)
shkololо_ubiycaДата: Пятница, 09 Августа 2013, 12:16 | Сообщение # 9
частый гость
Сейчас нет на сайте
engineer_pro, не неси чушь. Нет ничего удобнее блендера, а если у кого-то руки из жопы, то даже 3дмакс это не исправит.
Цитата (Asteroid)
Alastar, Ты вроде себя кодером в С# предлогал ?

Как же, какой ты игродел если не знаешь С#?


Сообщение отредактировал shkololо_ubiyca - Пятница, 09 Августа 2013, 12:32
UndeadДата: Пятница, 09 Августа 2013, 12:29 | Сообщение # 10
NeoAxis User
Сейчас нет на сайте
Цитата (engineer_pro)
во 1 , если такая путаница у тебя , автоматом переходи на 3д макс, в 3д максе интерфейс дружелюбней да и проффесиональней

Хейтеры на месте biggrin
Интерфейс там нормальный. А если очень уж хочется, то можно настройт такой же, как у максе.


Вcем зла.
AlastarДата: Пятница, 09 Августа 2013, 12:33 | Сообщение # 11
постоянный участник
Сейчас нет на сайте
shkololо_ubiyca, так я не только напильник знаю) Но учил в основном C#(по книжке), а остальным самостоятельно научился.

Big Boobs (+18 only!)
shkololо_ubiycaДата: Пятница, 09 Августа 2013, 12:44 | Сообщение # 12
частый гость
Сейчас нет на сайте
Цитата (Alastar)
shkololо_ubiyca, так я не только напильник знаю) Но учил в основном C#(по книжке), а остальным самостоятельно научился.

ну так продемонстрируй то что ты знаешь, языком чесать здесь каждый мастер
AlastarДата: Пятница, 09 Августа 2013, 12:46 | Сообщение # 13
постоянный участник
Сейчас нет на сайте
shkololо_ubiyca, всмысле продемонстрируй? Демонстрация разная бывает.

Big Boobs (+18 only!)
shkololо_ubiycaДата: Пятница, 09 Августа 2013, 12:58 | Сообщение # 14
частый гость
Сейчас нет на сайте
Alastar, пффф... Ну покажи свои алгоритмы, функции или игры, написанные на С# и остальных языках, которые ты знаешь
AlastarДата: Пятница, 09 Августа 2013, 13:13 | Сообщение # 15
постоянный участник
Сейчас нет на сайте
shkololо_ubiyca, пфф, ок
JavaScript:
Код

function ArrayChecker(arr: Array()){
for(var i: int = 0; i < arr.length; i++){
   Debug.Log(arr[i] + "  element in array checked");
}
}

Java:
Код

public void SomeFunction(int par1, int par2){
int res = par1+ par2;
Out.println(par1.ToString() + " + " + par2.ToString() + " = " res.ToString());
}

Assembler:
Код

title AddFunction.asm
.MODEL Large, C
.data
Extrn C x:Word, a:Word, b:Word
.code
Public C addInt
addInt proc far
mov ax, WORD PTR a
mov bx, WORD PTR a+2
mov cx, WORD PTR b
mov dx, WORD PTR b+2
add ax, cx
adc bx, dx
mov WORD PTR x, ax
mov WORD PTR x +2, bx
ret
addInt endp
end

C#(Работаю с Lidgren):
Код

void OnGUI(){
  GUILayout.BeginVertical();
   if(GUILayout.Button("StartServer")){
    NetPeerConfiguration config = new NetPeerConfiguration("TestServer");
    config.Port = 14242;
    server = new NetServer(config);
    StartServer();
   }
   servMsg = GUILayout.TextArea(servMsg);
    if(GUILayout.Button("Send")){
              sendTestMsg();
   }
   textF = GUILayout.TextArea(textF);
    
   if(GUILayout.Button("Connect")){
    client = new NetClient(new NetPeerConfiguration("TestClient"));
    client.Start();
    Thread.Sleep(500);
    try{
    client.Connect(new IPEndPoint(IPAddress.Parse(textF), 14242));
    Debug.Log("Now you are client and you connected in theory");
    }catch(NetException e){
    Debug.Log("Error: " + e);
    }
   }
   GUILayout.EndVertical(


Big Boobs (+18 only!)

Сообщение отредактировал Alastar - Пятница, 09 Августа 2013, 13:14
shkololо_ubiycaДата: Пятница, 09 Августа 2013, 13:40 | Сообщение # 16
частый гость
Сейчас нет на сайте
Alastar, ну что за детский сад? ну просто копипаст. Давай так:
на яваскрипте напиши универсальный класс инвентаря, используя любой двиг (даже собственно-выдуманный)
на Java напиши игру змейку.
на C# процтетский чат.
PS. Не трогай асм!!!
AsteroidДата: Пятница, 09 Августа 2013, 13:41 | Сообщение # 17
Blender updated
Сейчас нет на сайте
Цитата (shkololо_ubiyca)
Как же, какой ты игродел если не знаешь С#?
я только русский знаю smile
Цитата (shkololо_ubiyca)
Нет ничего удобнее блендера,

поддерживаю.
AlastarДата: Пятница, 09 Августа 2013, 13:59 | Сообщение # 18
постоянный участник
Сейчас нет на сайте
shkololо_ubiyca, какой еще копипаст? Все сам написал.
Цитата
PS. Не трогай асм!!!

А че?) Разве непонятно что-то?))

Вот инвентарь на JS, окей(Мог бы и получше):
Код

#pragma strict
var nullTexture: Texture2D;
var about: String;
var InInventory: boolean = false;
var canUseInventory: boolean = true;
var items: GameObject[] = new GameObject[36];
var slots: Texture2D[] = new Texture2D[36];
var hasPlaceInInventory: boolean = true;
var DontHaveSpace: boolean = false;
var CanPickup: boolean = false;
var range: float;
var seeItem: boolean;
var cam: GameObject;
var actionMenuActive: boolean= false;
var CanDraw: boolean;
var myRect: Rect[] = new Rect[36];
private var actionItemSlot: int;
private var itemToAction:GameObject;
private var rectangleToDrawMA: Rect;
private var rectangleToDrawMAButton1: Rect;
private var rectangleToDrawMAButton2: Rect;
private var rectangleToDrawMAButton3: Rect;
private var  screenWidth: float;
private var  screenHeight: float;
private var  BalancedscreenWidth: float;
private var  BalancedscreenHeight: float;

function Update () {
CalibrateScreen();
CheckInventory();
for(var c: int = 0; c <= 35; c++)
{       
        if(myRect[c].Contains(new Vector2(Input.mousePosition.x, Screen.height - Input.mousePosition.y)) && Input.GetKeyDown(KeyCode.Mouse1))
        {
          if(items[c] != null)
          {
             actionMenuActive = !actionMenuActive;
             // itemScript = items[c].GetComponent(Item);
             rectangleToDrawMA = new Rect(Input.mousePosition.x, Screen.height - Input.mousePosition.y, 100 / BalancedscreenWidth, 175 / BalancedscreenHeight);
             rectangleToDrawMAButton1 = new Rect(Input.mousePosition.x + 5, Screen.height - Input.mousePosition.y + 55, 90 / BalancedscreenWidth, 30 / BalancedscreenHeight);
             rectangleToDrawMAButton2 = new Rect(Input.mousePosition.x + 5, Screen.height - Input.mousePosition.y + 90, 90 / BalancedscreenWidth, 30 / BalancedscreenHeight);
             rectangleToDrawMAButton3 = new Rect(Input.mousePosition.x + 5, Screen.height - Input.mousePosition.y + 125, 90 / BalancedscreenWidth, 30 / BalancedscreenHeight);
             itemToAction = items[c];
             actionItemSlot = c;
             CanDraw = true;
          }
        }
}
if(Input.GetButtonDown("Inventory"))
{
InInventory = !InInventory;
}
}
function OnGUI()
{
checkWeaponSlots();
var hitInfo = RaycastHit();
Physics.Raycast(cam.transform.position, cam.transform.forward,hitInfo);
if(hitInfo.transform){
if(hitInfo.transform.tag == "Item" && hitInfo.distance <= range)
{
seeItem = true;
}
else
{
seeItem = false;
}
}
if(DontHaveSpace && seeItem){
GUI.Label(new Rect((Screen.width / 2) - 150, 850 / BalancedscreenHeight, 300 / BalancedscreenWidth, 60 / BalancedscreenHeight), "Нету места в инвентаре!");
}
if(CanPickup && seeItem){
GUI.Label(new Rect((Screen.width / 2) - 150, 890 / BalancedscreenHeight, 300 / BalancedscreenWidth, 60 / BalancedscreenHeight), "Нажмите H(Русская Р) чтобы подобрать");
}
if(InInventory && canUseInventory)
{
      Time.timeScale = 0;
      AudioListener.pause = true;
      Screen.showCursor = true;
      Screen.lockCursor = false;
     GUI.Box(new Rect(150 / BalancedscreenWidth, 100 / BalancedscreenHeight, 930 / BalancedscreenWidth, 800 / BalancedscreenHeight), "Инвентарь");
     DrawSlots();
         
}
else if(canUseInventory)
{
ResumeGame();
}
if(actionMenuActive && CanDraw && InInventory && canUseInventory && items[actionItemSlot] != null){
       DrawActionMenu();
     }
}
function ResumeGame()
{
       AudioListener.pause = false;
       Time.timeScale = 1;
}
function CalibrateScreen()
{
     this.screenWidth = Screen.width;
     this.screenHeight = Screen.height;
     this.BalancedscreenWidth = 1280 / screenWidth;
     this.BalancedscreenHeight = 1024 / screenHeight;
}
function DrawSlots()
{
for(var i: int = 0; i <= 35; i++)
{
if(items[i] == null)
{
slots[i] = nullTexture;
}
}
for(var a: int = 0; a <= 35; a++)
{
if(items[a] != null)
{
slots[a] = items[a].GetComponent(Item).itemTexture;
}
}
myRect[0] = new Rect(180 / BalancedscreenWidth, 125 / BalancedscreenHeight, 75/ BalancedscreenWidth, 75 / BalancedscreenHeight);
myRect[1] = new Rect(180 / BalancedscreenWidth, 225 / BalancedscreenHeight, 75 / BalancedscreenWidth, 75 / BalancedscreenHeight);
myRect[2] = new Rect(180 / BalancedscreenWidth, 325 / BalancedscreenHeight, 75 / BalancedscreenWidth, 75 / BalancedscreenHeight);
myRect[3] = new Rect(180 / BalancedscreenWidth, 425 / BalancedscreenHeight, 75 / BalancedscreenWidth, 75 / BalancedscreenHeight);
myRect[4] = new Rect(280 / BalancedscreenWidth, 125 / BalancedscreenHeight, 75 / BalancedscreenWidth, 75 / BalancedscreenHeight);
myRect[5] = new Rect(280 / BalancedscreenWidth, 225 / BalancedscreenHeight, 75 / BalancedscreenWidth, 75 / BalancedscreenHeight);
myRect[6] = new Rect(280 / BalancedscreenWidth, 325 / BalancedscreenHeight, 75 / BalancedscreenWidth, 75 / BalancedscreenHeight);
myRect[7] = new Rect(280 / BalancedscreenWidth, 425 / BalancedscreenHeight, 75 / BalancedscreenWidth, 75 / BalancedscreenHeight);
myRect[8] = new Rect(380 / BalancedscreenWidth, 125 / BalancedscreenHeight, 75 / BalancedscreenWidth, 75 / BalancedscreenHeight);
myRect[9] = new Rect(380 / BalancedscreenWidth, 225 / BalancedscreenHeight, 75 / BalancedscreenWidth, 75 / BalancedscreenHeight);
myRect[10] = new Rect(380 / BalancedscreenWidth, 325 / BalancedscreenHeight, 75 / BalancedscreenWidth, 75 / BalancedscreenHeight);
myRect[11] = new Rect(380 / BalancedscreenWidth, 425 / BalancedscreenHeight, 75 / BalancedscreenWidth, 75 / BalancedscreenHeight);
myRect[12] = new Rect(480 / BalancedscreenWidth, 125 / BalancedscreenHeight, 75 / BalancedscreenWidth, 75 / BalancedscreenHeight);
myRect[13] = new Rect(480 / BalancedscreenWidth, 225 / BalancedscreenHeight, 75 / BalancedscreenWidth, 75 / BalancedscreenHeight);
myRect[14] = new Rect(480 / BalancedscreenWidth, 325 / BalancedscreenHeight, 75 / BalancedscreenWidth, 75 / BalancedscreenHeight);
myRect[15] = new Rect(480 / BalancedscreenWidth, 425 / BalancedscreenHeight, 75 / BalancedscreenWidth, 75 / BalancedscreenHeight);
myRect[16] = new Rect(580 / BalancedscreenWidth, 125 / BalancedscreenHeight, 75 / BalancedscreenWidth, 75 / BalancedscreenHeight);
myRect[17] = new Rect(580 / BalancedscreenWidth, 225 / BalancedscreenHeight, 75 / BalancedscreenWidth, 75 / BalancedscreenHeight);
myRect[18] = new Rect(580 / BalancedscreenWidth, 325 / BalancedscreenHeight, 75 / BalancedscreenWidth, 75 / BalancedscreenHeight);
myRect[19] = new Rect(580 / BalancedscreenWidth, 425 / BalancedscreenHeight, 75 / BalancedscreenWidth, 75 / BalancedscreenHeight);
myRect[20] = new Rect(680 / BalancedscreenWidth, 125 / BalancedscreenHeight, 75 / BalancedscreenWidth, 75 / BalancedscreenHeight);
myRect[21] = new Rect(680 / BalancedscreenWidth, 225 / BalancedscreenHeight, 75 / BalancedscreenWidth, 75 / BalancedscreenHeight);
myRect[22] = new Rect(680 / BalancedscreenWidth, 325 / BalancedscreenHeight, 75 / BalancedscreenWidth, 75 / BalancedscreenHeight);
myRect[23] = new Rect(680 / BalancedscreenWidth, 425 / BalancedscreenHeight, 75 / BalancedscreenWidth, 75 / BalancedscreenHeight);
myRect[24] = new Rect(780 / BalancedscreenWidth, 125 / BalancedscreenHeight, 75 / BalancedscreenWidth, 75 / BalancedscreenHeight);
myRect[25] = new Rect(780 / BalancedscreenWidth, 225 / BalancedscreenHeight, 75 / BalancedscreenWidth, 75 / BalancedscreenHeight);
myRect[26] = new Rect(780 / BalancedscreenWidth, 325 / BalancedscreenHeight, 75 / BalancedscreenWidth, 75 / BalancedscreenHeight);
myRect[27] = new Rect(780 / BalancedscreenWidth, 425 / BalancedscreenHeight, 75 / BalancedscreenWidth, 75 / BalancedscreenHeight);
myRect[28] = new Rect(880 / BalancedscreenWidth, 125 / BalancedscreenHeight, 75 / BalancedscreenWidth, 75 / BalancedscreenHeight);
myRect[29] = new Rect(880 / BalancedscreenWidth, 225 / BalancedscreenHeight, 75 / BalancedscreenWidth, 75 / BalancedscreenHeight);
myRect[30] = new Rect(880 / BalancedscreenWidth, 325 / BalancedscreenHeight, 75 / BalancedscreenWidth, 75 / BalancedscreenHeight);
myRect[31] = new Rect(880 / BalancedscreenWidth, 425 / BalancedscreenHeight, 75 / BalancedscreenWidth, 75 / BalancedscreenHeight);
myRect[32] = new Rect(980 / BalancedscreenWidth, 125 / BalancedscreenHeight, 75 / BalancedscreenWidth, 75 / BalancedscreenHeight);
myRect[33] = new Rect(980 / BalancedscreenWidth, 225 / BalancedscreenHeight, 75 / BalancedscreenWidth, 75 / BalancedscreenHeight);
myRect[34] = new Rect(980 / BalancedscreenWidth, 325 / BalancedscreenHeight, 75 / BalancedscreenWidth, 75 / BalancedscreenHeight);
myRect[35] = new Rect(980 / BalancedscreenWidth, 425 / BalancedscreenHeight, 75 / BalancedscreenWidth, 75 / BalancedscreenHeight);

GUI.Box(myRect[0], slots[0]);
GUI.Box(myRect[1], slots[1]);
GUI.Box(myRect[2], slots[2]);
GUI.Box(myRect[3], slots[3]);
GUI.Box(myRect[4], slots[4]);
GUI.Box(myRect[5], slots[5]);
GUI.Box(myRect[6], slots[6]);
GUI.Box(myRect[7], slots[7]);
GUI.Box(myRect[8], slots[8]);
GUI.Box(myRect[9], slots[9]);
GUI.Box(myRect[10], slots[10]);
GUI.Box(myRect[11], slots[11]);
GUI.Box(myRect[12], slots[12]);
GUI.Box(myRect[13], slots[13]);
GUI.Box(myRect[14], slots[14]);
GUI.Box(myRect[15], slots[15]);
GUI.Box(myRect[16], slots[16]);
GUI.Box(myRect[17], slots[17]);
GUI.Box(myRect[18], slots[18]);
GUI.Box(myRect[19], slots[19]);
GUI.Box(myRect[20], slots[20]);
GUI.Box(myRect[21], slots[21]);
GUI.Box(myRect[22], slots[22]);
GUI.Box(myRect[23], slots[23]);
GUI.Box(myRect[24], slots[24]);
GUI.Box(myRect[25], slots[25]);
GUI.Box(myRect[26], slots[26]);
GUI.Box(myRect[27], slots[27]);
GUI.Box(myRect[28], slots[28]);
GUI.Box(myRect[29], slots[29]);
GUI.Box(myRect[30], slots[30]);
GUI.Box(myRect[31], slots[31]);
GUI.Box(myRect[32], slots[32]);
GUI.Box(myRect[33], slots[33]);
GUI.Box(myRect[34], slots[34]);
GUI.Box(myRect[35], slots[35]);
for(var b: int = 0; b <= 35; b++)
{
        if(myRect[b].Contains(new Vector2(Input.mousePosition.x, Screen.height - Input.mousePosition.y)))
        {
            if(items[b] == null)
            {
               about = "Ничего особенного";
            }
            else
            {
              var itemScript = items[b].GetComponent(Item);
              about = itemScript.about;
              if(Input.GetKeyDown(KeyCode.Mouse1))
               {
                   
               }
            }
        }
}
GUI.Box(new Rect(180 / BalancedscreenWidth, 515 / BalancedscreenHeight, 880 / BalancedscreenWidth, 350 / BalancedscreenHeight), new GUIContent(about));
}
function UDontHaveSpaceToPickItem()
{
     DontHaveSpace = true;
}
function UCanPickItem()
{
     CanPickup = true;
}
function UCannotPickItem()
{
     CanPickup = false;
     DontHaveSpace = false;
}
function CheckInventory()
{
if(items.SyncRoot == 36)
{
hasPlaceInInventory = false;
}
else
{
hasPlaceInInventory = true;
}
}
function DrawActionMenu()
{
     GUI.Box(rectangleToDrawMA, "Действие");
     if(GUI.Button(rectangleToDrawMAButton1, "Использовать"))
     {
      itemToAction.GetComponent(Item).Use();
     }
     if(GUI.Button(rectangleToDrawMAButton2, "Выкинуть"))
     {
      itemToAction.GetComponent(Item).Drop();
     }
     if(GUI.Button(rectangleToDrawMAButton3, "Закрыть"))
     {
     actionMenuActive = false;
     }
}
function checkWeaponSlots()
{     
     var weaponScript = transform.parent.FindChild("Weapon Camera").GetComponent(AWSPlayerWeapons);
     var slot1content = weaponScript.weapons[0].gameObject.GetComponent(WeaponNamer).weaponName;
     var slot2content = weaponScript.weapons[1].gameObject.GetComponent(WeaponNamer).weaponName;
     var slot3content = weaponScript.weapons[2].gameObject.GetComponent(WeaponNamer).weaponName;
     var slot4content = weaponScript.weapons[3].gameObject.GetComponent(WeaponNamer).weaponName;
         
     var slot1rect = new Rect(485 / BalancedscreenWidth, 953 / BalancedscreenHeight, 75 / BalancedscreenWidth, 90 / BalancedscreenHeight);
     var slot2rect = new Rect(561 / BalancedscreenWidth, 953 / BalancedscreenHeight, 75 / BalancedscreenWidth, 90 / BalancedscreenHeight);
     var slot3rect = new Rect(637 / BalancedscreenWidth, 953 / BalancedscreenHeight, 75 / BalancedscreenWidth, 90/ BalancedscreenHeight);
     var slot4rect = new Rect(713 / BalancedscreenWidth, 953 / BalancedscreenHeight, 75 / BalancedscreenWidth, 90 / BalancedscreenHeight);
         
     if(weaponScript.currentWeapon == 0){
     slot1rect = new Rect(485 / BalancedscreenWidth, 943 / BalancedscreenHeight, 75 / BalancedscreenWidth, 90 / BalancedscreenHeight);}
         
     if(weaponScript.currentWeapon == 1){
     slot2rect = new Rect(561 / BalancedscreenWidth, 943 / BalancedscreenHeight, 75 / BalancedscreenWidth, 90 / BalancedscreenHeight);}
         
     if(weaponScript.currentWeapon == 2){
     slot3rect = new Rect(637 / BalancedscreenWidth, 943 / BalancedscreenHeight, 75 / BalancedscreenWidth, 90 / BalancedscreenHeight);}
         
     if(weaponScript.currentWeapon == 3){
     slot4rect = new Rect(713 / BalancedscreenWidth, 943 / BalancedscreenHeight, 75 / BalancedscreenWidth, 90 / BalancedscreenHeight);}
          
     GUI.Box(slot1rect, slot1content);
     GUI.Box(slot2rect, slot2content);
     GUI.Box(slot3rect, slot3content);
     GUI.Box(slot4rect, slot4content);
}

C# чат:
Код

using System;
using UnityEngine;
using System.Collections;

class ChatEntry
{
     public string name = "";
     public string text = "";     
}

private boolean focusChat = false;
private float screenWidth;
private float screenHeight ;
private float BalancedscreenWidth;
private float BalancedscreenHeight;
private Vector2 scrollPosition;
private List<ChatEntry> chatEntries = new List.<ChatEntry>();
private string inputField = "";
private string playerName;
public  GUIStyle style;

void Awake () {
if(!networkView.isMine)
enabled = false;
}

void Update () {
                    this.screenWidth = Screen.width;
      this.screenHeight = Screen.height;
      this.BalancedscreenWidth = 1280 / screenWidth;
      this.BalancedscreenHeight = 1024 / screenHeight;
          
      if(Input.GetKeyUp(KeyCode.Y))
      {
      focusChat = !focusChat ;
      }

}

void OnGUI()
{
if(focusChat)
{
     GUI.Window(1, new Rect(10/ BalancedscreenWidth, 350 / BalancedscreenHeight, 400 / BalancedscreenWidth, 350 / BalancedscreenHeight), chatWindowFocused, "");
}
else
{
     GUI.Window(0, new Rect(10/ BalancedscreenWidth, 350 / BalancedscreenHeight, 400 / BalancedscreenWidth, 350 / BalancedscreenHeight), chatWindowUnfocused, "", style);
}
}
void chatWindowUnfocused(int id)
{
     GUILayout.BeginVertical();
     GUILayout.Space(10);
     GUILayout.EndVertical();

     scrollPosition = GUILayout.BeginScrollView (scrollPosition);

     for (ChatEntry entry in chatEntries as List.<ChatEntry>)
     {
      GUILayout.BeginHorizontal();
      if(entry.name==""){
       GUILayout.Label (entry.text);
      }else{
       GUILayout.Label (entry.name+": "+entry.text);
      }
      GUILayout.EndHorizontal();
      GUILayout.Space(3);
          
     }

        GUILayout.EndScrollView ();
}
void chatWindowFocused(int id)
{
        this.GetComponent(Status).setInChat();
     GUILayout.BeginVertical();
     GUILayout.Space(10);
     GUILayout.EndVertical();

     scrollPosition = GUILayout.BeginScrollView (scrollPosition);

     for (ChatEntry  entry in chatEntries as List.<ChatEntry>)
     {
      GUILayout.BeginHorizontal();
      if(entry.name==""){
       GUILayout.Label (entry.text);
      }else{
       GUILayout.Label (entry.name+": "+entry.text);
      }
      GUILayout.EndHorizontal();
      GUILayout.Space(3);
          
     }

        GUILayout.EndScrollView ();
            
        inputField = GUI.TextField(new Rect(5/ BalancedscreenWidth, 310 / BalancedscreenHeight, 390 / BalancedscreenWidth, 30 / BalancedscreenHeight), inputField);

         if(Input.GetKeyDown(KeyCode.Return) && inputField.Length != 0)
      HitEnter(inputField);
}
[RPC]
void ApplyGlobalChatText (string name ,string msg)
{
     ChatEntry  entry  = new ChatEntry();
     entry.name = name;
     entry.text = msg;

     chatEntries.Add(entry);
         
     if (chatEntries.Count > 8){
      chatEntries.RemoveAt(0);
     }
     scrollPosition.y = 1000000;     
}
void HitEnter(string msg ){
     msg = msg.Replace("\n", "");
     playerName = this.GetComponent(Status).getNick();
        GameObject.Find("Network").networkView.RPC("tryToSendChat", RPCMode.All, playerName, msg);
     inputField = "";
}

Джаву не настолько знаю для змейки)
Думаю, хватит оффтопить


Big Boobs (+18 only!)

Сообщение отредактировал Alastar - Пятница, 09 Августа 2013, 14:12
engineer_proДата: Суббота, 10 Августа 2013, 10:09 | Сообщение # 19
постоянный участник
Сейчас нет на сайте
shkololо_ubiyca, блендер ,как был корявой программой так и остался, это факт

официальный сайт -
AsteroidДата: Понедельник, 12 Августа 2013, 06:41 | Сообщение # 20
Blender updated
Сейчас нет на сайте
engineer_pro, у кого руки не по месту растут то и пластелин будет кривым , а у макса некогда не был интерфейс дружелюбным.
Форум игроделов » Ресурсы и Примеры игр » 3D-моделирование и 3D-графика » Проблема с моделью
  • Страница 1 из 2
  • 1
  • 2
  • »
Поиск:

Все права сохранены. GcUp.ru © 2008-2024 Рейтинг