// Start is called before the first frame update void Start() { taken = false; healthBonus = false; ammoBonus = false; Player = GameObject.Find("Player"); FPC = GameObject.Find("Player/FirstPersonCharacter"); script2 = Player.GetComponent <Healing>(); GC = GameObject.Find("GameController"); script3 = FPC.GetComponent <ThrowGrenade>(); script = GC.GetComponent <GameController>(); }
void Start() { deadScreen.loadAd(); Physics2D.IgnoreLayerCollision(11, 12); Physics2D.IgnoreLayerCollision(12, 12); #if Computer sleft.enabled = false; sright.enabled = false; sshoot.enabled = false; sgrenade.enabled = false; sswitch.enabled = false; rsup.enabled = false; #endif #if Andriod cam = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <Camera>(); shot = GetComponent <shoot>(); throwGrenade = GetComponent <ThrowGrenade>(); sleft.transform.position = pw3(new Vector3(mleft.x, mleft.y, 2)); sright.transform.position = pw3(new Vector3(mright.x, mright.y, 2)); sgrenade.transform.position = pw3(new Vector3(mgrenade.x, mgrenade.y, 2)); sshoot.transform.position = pw3(new Vector3(mshoot.x, mshoot.y, 2)); sswitch.transform.position = pw3(new Vector3(mswitch.x, mswitch.y, 2)); sup.transform.position = pw3(new Vector3(mup.x, mup.y, 2)); sleft.transform.localScale = getScale(new Vector2(mleft.width, mleft.height)); sright.transform.localScale = getScale(new Vector2(mright.width, mright.height)); sgrenade.transform.localScale = getScale(new Vector2(mgrenade.width, mgrenade.height)); sshoot.transform.localScale = getScale(new Vector2(mshoot.width, mshoot.height)); sswitch.transform.localScale = getScale(new Vector2(mswitch.width, mswitch.height)); sup.transform.localScale = getScale(new Vector2(mup.width, mup.height)); rleft = new box(mleft); rright = new box(mright); rgrenade = new box(mgrenade); rshoot = new box(mshoot); rswitch = new box(mswitch); rup = new box(mup); #endif }
// Start is called before the first frame update void Start() { startPointX = AIPlayer.transform.position.x; throwGrenade = FindObjectOfType <ThrowGrenade>(); }