testing
This commit is contained in:
reedgamingstudio
2014-12-16 00:23:12 -06:00
parent c0c0755cc6
commit 5b8ebb7a35
1697 changed files with 1115979 additions and 0 deletions
@@ -0,0 +1,30 @@
//NSdesignGames @ 2012
//FPS Kit | Version 2.0
#pragma strict
var scopeTexture : Texture2D;
//When we aim, deactivate all visible Sniper parts (Hands, Gun etc.)
var objectsToDeactivate : GameObject[];
private var weapScript : WeaponScript;
function Awake () {
weapScript = gameObject.GetComponent.<WeaponScript>();
}
function OnGUI () {
if(weapScript.aimed){
GUI.DrawTexture(Rect(Screen.width/2- (Screen.height*1.8)/2,Screen.height/2-Screen.height/2, Screen.height*1.8, Screen.height), scopeTexture);
for(var i : int = 0; i<objectsToDeactivate.Length;i++){
objectsToDeactivate[i].SetActiveRecursively(false);
}
}else{
for(var a : int = 0; a<objectsToDeactivate.Length;a++){
objectsToDeactivate[a].SetActiveRecursively(true);
}
}
}
@script AddComponentMenu ("FPS system/Weapon System/SniperScope")