07-30-2017, 07:11 AM
- var gun1 : GameObject;
- [/url]var gun2 : GameObject;
-
- function Update(){
- if (Input.GetKeyDown("1"))
- SwapWeapons();
- if (Input.GetKeyDown("2"))
- SwarWeapons();
- }
-
- function SwapWeapons(){
- gun1.SetActiveRecursively(false);
- gun2.SetActiveRecursively(true);
- }
- function SwarWeapons(){
- gun1.SetActiveRecursively(true);
- gun2.SetActiveRecursively(false);
- [url=http://oyun-programlama.com/Thread/37474-silah-de%C4%9Fi%C5%9Ftirme-scripti/#codeLine_19_339def]}