This site uses cookies! Learn More

This site uses cookies!

armedunity.com uses cookies to improve user experience.

By continuing to use this site, you agree to allow us to store cookies on your computer.

Search the Community: Showing results for tags 'csharp'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • GENERAL
    • Introduce yourself
    • Discussions
    • Showcase
    • Need help?
    • Seeking team members?
    • Offtopic
  • RESOURCES
    • unity3D | Example Projects
    • unity3D | Scripts
    • unity3D | Shaders
    • unity3D | Tutorials
    • 3D models
    • Animated 3D Models
    • Graphic design
    • Textures
    • Sounds
    • Other
  • FREE FPS PROJECT
    • FPSKit Download
    • FPSKit Modifications/Tutorials
    • FPSKit WIP/Showcase
    • Discussions / Bug reports
  • SELL | REQUEST
    • Sell
    • Request

Categories

  • Free Projects
  • Free Assets
  • Game Demos

Calendars

  • Community Calendar

Facebook URL


Twitter URL


IndieGoGo URL


Kickstarter URL


IndieDB URL


GreenLight URL


Location:


Interests

Found 10 results

  1. Hello, a bit over an hour ago, I signed up on codefights, and I got to a thing where you have to get the century from year. Which was pretty easy, and there's soo many ways to do it. Anyway, after I came up with a solution, I wanted to see how other people solved it, and the most interesting one I saw were return --year / 100 + 1 How does this work? I know -------------------------------- year = 1800 year / 100 + 1 = 19 expected = 18 -------------------------------- year = 1801 year / 100 + 1 = 19 expected = 19 -------------------------------- but if I add the -- before year, then it will output -------------------------------- year = 1800 --year / 100 + 1 = 18 expected = 18 -------------------------------- year = 1824 --year / 100 + 1 = 19 expected = 19 -------------------------------- How come after -- has been added before year, it all gets decremented kind of like, if year % 100 == 0 then decrement year / 100 + 1. Am I completely off? This just confuses me a bit, and it just makes me nuts, not knowing how it works Please help me to make me understand this, would really appreciate it I have seen it in for loops too(Not often though, only seen it being used in for loops 2 times), like so for(int i = 5; i > 0; --i) { // Blah blah } I have seen it with ++i too
  2. unity

    Hello everyone, I am Vadim. Do you not have the knowledge of C# or simply can't find the time to write scripts for your future game? Well, here I am offering to write any Unity C# script you need in no time for as low as 5$, and maximum 15$ for very complex scripts. If you are not be satisfied, you get all your money back guaranteed. So nothing to lose right. I am a Unity C# programmer with 2+ years of experience, very passionate about game development and have developed many different games 2D and 3D. SERVICE LINK: http://www.fiverr.com/technographicpc/write-you-a-unity3d-csharp-script You can also have a look at a small 2D game I have created alone a few months ago: http://gamejolt.com/games/haunted-rescue/221410 Thanks for reading!
  3. Hello, I made a custom editor window that you can use to easily create scriptable objects, without having to write any code Hope you can find a good use for it. I will try to optimize it as much as I can. Not sure how fast it is on big projects. If anyone is trying it on big projects, then please tell me how it ran. I really want to optimize it as well as I can If you find any bugs or have any suggestions, then please tell me PS. If you have any advice to make it better, please tell me. This is also my first time I created a custom editor window Download: SOC - Scriptable Object Creator.unitypackage Video: Screenshots:
  4. Hello, I quickly put together a hunger and thirst script, and I just wanted to share something with you all, and you can use it as you please HungerThirst.cs And here's an example on how you could use it HealthExample.cs
  5. Hello world. Im here to ask one question and hopefully people will write back and take their time to reed this. So my question to the programmers out there is, whats, where and how is the best way to learn Unity C# programming. When i say C# Programming i also mean Network Programming, it is completly okey and ill be really thankful if there isn't a really good unity3d network programming tutorial but only the other type of programming. Anything helps out! I have searched around a lot a lot of to learn programming networking, but don't find so much useful tutorials. I can program a little bit, i have made a basic FPS game by my self and it is really cool in my opinion, but it is boring to play a game where you can't do much but walk around and shoot Ai. So i really wanted to learn Network Programming. Then came this beautiful thing called Unet, or maybe it is old, i dont know, when i say Unet i mean all the new networking components. My experience with multiplayer : The only thing i have completed by using Unet, is making a player join by the NetworkManager / NetworkManagerHUD and walk around and look around in a FPS type of view. And it worked / works. That wasn't so advanced and hard to program, so i thought that it wouldn't be so hard to program in other things like shooting, switching weapons and so on. Oh God it was. So then i ran into this type of thing called [Command] //or Cmd This was new, and it will be new and never be understood by me. I am talking about a lot of other commands and words in Unet programming, but these are the first ones i ran into. So my question is, is there really any good and useful tutorials / streams / courses or whatever it can be, that will help you out in Unity3D C# Programming and Unity3D C# Network Programming ? Thanks in advance for reading all this, thank you for your time and i hope you have a good answer and i hope you have a wonderful day
  6. Hey there, it's been a while since my last post but i really need some help with an assignment in my University. The project, using Visual C# (Visual Studio), is to develop an elevator system for a 5 storey building, i don't care about the design or how to move the elevator and stuff, all i really have to do is to develop the 'right' logic for the elevator so it can choose where to stop in the 'correct' order. My problem is that i can not decide which data structure is needed and how to make the elevator to pick the right order. Translated Assignment: (English might be from weird to really bad) And in any case, of course and i don't want someone to develop this application for me, all i want is some help on which data structure should i use and how to implement a fair elevator logic. I really appreciate your help.
  7. Hi guys. I want to convert a CSharp code to Javascript. It's possible ? The code (CS) : Hashtable setPlayerKills = new Hashtable() {{"Kills", 0}}; PhotonNetwork.player.SetCustomProperties(setPlayerKills); Hashtable setPlayerDeaths = new Hashtable() {{"Deaths", 0}}; PhotonNetwork.player.SetCustomProperties(setPlayerDeaths);
  8. Heya! I want to make a script to Walljump like in the game FORGE( https://www.youtube.com/watch?v=rsCWZmahIwo ). I've been trying a few tricks but as I lack knowledge I need some help. This is what I got: void OnCollisionEnter(Collision collision) { if (onGround == false && collision.transform.tag == "WallJump" ) { if(Input.GetButton("Jump")){ this.gameObject.transform.Translate(Vector3.up * 1,Space.World); this.gameObject.transform.Translate(Vector3.left * 2,Space.World); Debug.Log("Success"); } } }
  9. I need help with this: I Want to change the layer of the soldier (and it works!) and the weapon (this not work). This is the order of the childs: This is my code: using UnityEngine; using System.Collections; public class Network2 : Photon.MonoBehaviour { private string roomName = ""; private string maxRoomPlayerstring = "1"; private int maxRoomPlayers = 1; public GameObject playerObject; public GameObject Spawn; // Use this for initialization void Start () { PhotonNetwork.ConnectUsingSettings("0.0.5 Dev"); } void OnGUI (){ GUILayout.Label(PhotonNetwork.connectionStateDetailed.ToString()); if (PhotonNetwork.insideLobby == true){ GUI.BeginGroup(new Rect(0, 0, Screen.width/2,Screen.height)); GUI.Box(new Rect(0, 0, Screen.width/2-60,Screen.height),"Join a game!"); foreach (RoomInfo room in PhotonNetwork.GetRoomList()) { GUILayout.Box(room.name + " " + room.playerCount + "/" + room.maxPlayers); if(GUILayout.Button("Join Room")){ PhotonNetwork.JoinRoom(room.name); } } roomName = GUI.TextField(new Rect(0,Screen.height-70,Screen.width/2-120,20),roomName,25); maxRoomPlayerstring = GUI.TextField(new Rect (Screen.width/2-100,Screen.height-70,20,20),maxRoomPlayerstring,2); if(maxRoomPlayerstring !=""){ maxRoomPlayers = int.Parse(maxRoomPlayerstring); if(maxRoomPlayers > 20) maxRoomPlayerstring = "20"; if(maxRoomPlayers < 1) maxRoomPlayerstring = "1"; } if(GUI.Button(new Rect(0,Screen.height-50,Screen.width/2-60,50),"Create a new room")){ if(roomName !=""){ PhotonNetwork.CreateRoom(roomName, true, true, maxRoomPlayers); } } GUI.EndGroup(); } } void OnJoinedRoom () { //destroy the main menu cam Destroy(playerObject); //Enalbe local player interaction GameObject Player = (GameObject)PhotonNetwork.Instantiate("Soldier",Spawn.transform.position,Spawn.transform.rotation,0); ((MonoBehaviour)Player.GetComponent ("MouseLook")).enabled = true; ((MonoBehaviour)Player.GetComponent ("FPSInputController")).enabled = true; ((MonoBehaviour)Player.GetComponent ("Movementanim")).enabled = true; ((MonoBehaviour)Player.GetComponent ("CharacterMotor")).enabled = true; Player.transform.FindChild("PSoldier").gameObject.SetActive(true); Player.transform.FindChild("Soldier").gameObject.layer = 8; //Here is the problem Player.transform.FindChild ("Ak 47").gameObject.layer = 8; Player.layer = 8; } }
  10. Hello all.. I'm messing around with a third Person shooter.. But when my weapon reloads its instant.. So i was hoping to put a "WaitForSeconds" in the reload function but since its C# I'm really not sure how to execute it. This is the reload part. private void Reload() { Debug.Log("Reload [" + weaponsSet[weaponIndex].weaponName+"]"); int needBullets = (weaponsSet[weaponIndex].clipSize - weaponsSet[weaponIndex].currentBulletsCount); if (weaponsSet[weaponIndex].haveBullets >= needBullets){ weaponsSet[weaponIndex].haveBullets -= needBullets; weaponsSet[weaponIndex].currentBulletsCount = weaponsSet[weaponIndex].clipSize; } else{ weaponsSet[weaponIndex].currentBulletsCount = weaponsSet[weaponIndex].haveBullets; weaponsSet[weaponIndex].haveBullets = 0; } } I have a variable public float reloadTime; I did some searching and found this. yield return new WaitForSeconds(reloadTime); but this throws a error The body of `WeaponController.Reload()' cannot be an iterator block because `void' is not an iterator interface type Also, If i replace Void Reload() with IEnumerator Reload() I get even more errors.. So im unsure what to do Hopefully someone can help me out.. if you need more info let me know