// Use this for initialization void Start() { SetDotTile(); Move(gameObject.transform.position); HideDotTile(); control = GameObject.Find("Control").GetComponent <ControlScript>(); }
void Start() { script = GetComponent<ControlScript>(); shufMat = ControlScript.RandomizeMaterial(mat); int count = 0; for(int i=0;i<3;i++){ for(int j=0;j<2;j++){ // int cardposX = (Screen.width /3); // int cardposY = (Screen.height/2); //Vector3 pos = new Vector3(i*cardposX,j*cardposY,0); Vector3 pos = new Vector3(i*10,j*20,0); cards[i] = (GameObject)Instantiate(card,pos,transform.rotation); Transform c = cards[i].transform.Find ("Face"); if(c == null)Debug.LogError ("No Face Object"); c.renderer.material = new Material(Shader.Find("Diffuse")); c.renderer.material = shufMat[count]; cards[i].GetComponent<CardScript>().cardTag = shufMat[count].name; count++; } } script.SetMaxCard(6); }
void Start() { script = GetComponent<ControlScript>(); shufMat = ControlScript.RandomizeMaterial(mat); int count = 0; Debug.Log(Screen.width); int ScreenOneThirdWidth = Screen.width /3; Debug.Log("screeonethirdwidth"+ScreenOneThirdWidth); int ScreenOneThirdDividetwoWidth = ScreenOneThirdWidth /20; Debug.Log("screenonethirddividetwowidth"+ScreenOneThirdDividetwoWidth); for(int i=0;i<3;i++){ for(int j=0;j<2;j++){ Vector3 pos = new Vector3(i*ScreenOneThirdDividetwoWidth ,j*20,0); Debug.Log(i+ "card ="+ pos.x); cards[i] = (GameObject)Instantiate(card,pos,transform.rotation); Transform c = cards[i].transform.Find ("Face"); if(c == null)Debug.LogError ("No Face Object"); c.renderer.material = new Material(Shader.Find("Diffuse")); c.renderer.material = shufMat[count]; cards[i].GetComponent<CardScript>().cardTag = shufMat[count].name; count++; } } script.SetMaxCard(6); }
private void Awake() { Instance = this; #if UNITY_IOS Application.targetFrameRate = 60; #endif }
// Use this for initialization void Start() { Application.targetFrameRate = 60; meshFilter = gameObject.AddComponent <MeshFilter>(); mesh = meshFilter.mesh; ControlScript.AddShapeChange(StartVMesh); }
public ControlInfo(ControlScript script, NetcoreDbgTestCore.Environment env) { Breakpoints = script.Breakpoints; TestName = env.TestName; SourceFilesPath = env.SourceFilesPath; TargetAssemblyPath = env.TargetAssemblyPath; CorerunPath = env.CorerunPath; }
void OnTriggerExit2D(Collider2D other) { ControlScript yeti = other.gameObject.GetComponent <ControlScript>(); if (yeti != null) { yeti.DeactivateShelter(); } }
void Start() { if (SceneManager.GetActiveScene() == SceneManager.GetSceneByName("Test")) { control = GameObject.Find("Control").GetComponent <ControlScript>(); MenuUI = GameObject.Find("MenuUI").GetComponent <MenuUI>(); } LoadUI.SetActive(false); }
// Start is called before the first frame update void Start() { _combatStatsManagerScript = GetComponent <CombatStatsManagerScript>(); ActionOnSlideInDone += SlideInDone; ActionOnSlideOutDone += SlideOutDone; ActionOnPlayerAttackHitDone += OnPlayerAttackComplete; ActionOnPlayerAttackRecallDone += SlideOut; _controlScript = ControlScript.Instance; }
void Start(){ anim = GetComponent<Animator>(); anim.SetBool("IsGrounded", isGrounded); anim.SetBool("IsFacingLeft", isFacingLeft); anim.SetBool("IsFacingRight", isFacingRight); myAudioSource = GetComponent<AudioSource>(); myRigid = GetComponent<Rigidbody2D>(); controlScript = Camera.main.GetComponent<ControlScript>(); }
void Start() { anim = GetComponent <Animator>(); anim.SetBool("IsGrounded", isGrounded); anim.SetBool("IsFacingLeft", isFacingLeft); anim.SetBool("IsFacingRight", isFacingRight); myAudioSource = GetComponent <AudioSource>(); myRigid = GetComponent <Rigidbody2D>(); controlScript = Camera.main.GetComponent <ControlScript>(); }
//**************************************** //Connect to server 1. //IP server 1 is ServerAddressInputField.text //**************************************** void Start() { Instance = this; #if !UNITY_EDITOR Conductor.Instance.Initialized += Conductor_Initialized; Conductor.Instance.Initialize(CoreApplication.MainView.CoreWindow.Dispatcher); Conductor.Instance.EnableLogging(Conductor.LogLevel.Verbose); #endif }
void Start() { while (true) { waitOne(); break; } carControlExternalScript = customprefab.GetComponent <ControlScript>(); carControlExternalScript.waitCountDown = true; }
public override void Initialize() { controlscript = GetComponent<ControlScript> (); battlegooey = GetComponent<BattleGooey>(); scenariomanager = GetComponent<ScenarioManager> (); Debug.Log (scenariomanager); timer = battlegooey.SetTimerTime (totaltimetojump); scenariomanager.Initialize (); scenariomanager.InitializeScenario (); }
// Use this for initialization void Start() { Control = GameObject.Find("Control").GetComponent <ControlScript>(); MyCamera = GameObject.Find("Camera"); if (PlaceObject != null) { GetComponentInChildren <Text>().text = PlaceObject.name; } }
/// <summary> /// This gets called when a Flier crashes. /// </summary> /// <param name="controller">The controller of the flier that just crashed</param> public void NotifyOfCrash(ControlScript controller) { SensorSuite crashedSuite; if (Instances.TryGetValue(controller, out crashedSuite)) { Debug.Log("Crash by: " + controller.name + " using Sensor Suite:" + crashedSuite.name); } //What shall we do with a crash-ed flier, what shall we do with a crash-ed flier... }
void Awake() { if (instance == null) { instance = this; } Initialise(); _waitingForKey = false; }
//**************************************** //Connect to server 1. //IP server 1 is ServerAddressInputField.text //**************************************** void Start() { Instance = this; #if !UNITY_EDITOR Conductor.Instance.Initialized += Conductor_Initialized; Conductor.Instance.Initialize(CoreApplication.MainView.CoreWindow.Dispatcher); Conductor.Instance.EnableLogging(Conductor.LogLevel.Verbose); #endif ServerAddressInputField.text = "peercc-server.ortclib.org"; }
void Start() { Instance = this; #if !UNITY_EDITOR RunOnUiThread(() => { Task.Run(async() => { RequestAccessForMediaCaptureAndInit(); }); }); #endif ServerAddressInputField.text = "peercc-server.ortclib.org"; }
// Use this for initialization void Start() { //Logic fra Internett, usikker på nødvenigheten av bool-check. //Bruker vanligvis kun GetComponet. GameObject referenceObj = GameObject.Find("Player"); if (referenceObj != null) { controlScript = referenceObj.GetComponent <ControlScript>(); } }
void Start() { Instance = this; #if !UNITY_EDITOR Conductor.Instance.Initialized += Conductor_Initialized; Conductor.Instance.Initialize(CoreApplication.MainView.CoreWindow.Dispatcher); Conductor.Instance.EnableLogging(Conductor.LogLevel.Verbose); //Conductor.Instance.PeerConnectionStatsEnabled = true; #endif ServerAddressInputField.text = "192.168.1.163"; }
public void Run(string testCaseName, string testCourceList) { // Explicit encoding setup, since system console encoding could be not utf8 (Windows OS). // Note, netcoredbg aimed to interact with utf8 encoding usage only for all protocols. Console.OutputEncoding = System.Text.Encoding.UTF8; Console.InputEncoding = System.Text.Encoding.UTF8; string testSuiteRoot = Path.GetFullPath( Path.Combine(Directory.GetCurrentDirectory(), "../../../..") ); var Env = new NetcoreDbgTestCore.Environment(); Env.TestName = testCaseName; string[] testFileArray = testCourceList.Split(";"); foreach (var FileName in testFileArray) { Env.SourceFilesPath += Path.Combine(testSuiteRoot, testCaseName, FileName + ";"); } Env.SourceFilesPath = Env.SourceFilesPath.Remove(Env.SourceFilesPath.Length - 1); Env.TargetAssemblyPath = Path.Combine(testSuiteRoot, testCaseName + "/bin/Debug/netcoreapp3.1/", testCaseName + ".dll"); string fullDebuggerPath = Path.GetFullPath(Path.Combine(testSuiteRoot, DebuggerPath)); if (testCaseName.StartsWith("MI")) { LocalDebugger = new LocalDebuggerProcess(fullDebuggerPath, @" --interpreter=mi"); LocalDebugger.Start(); DebuggerClient = new MILocalDebuggerClient(LocalDebugger.Input, LocalDebugger.Output); } else if (testCaseName.StartsWith("VSCode")) { LocalDebugger = new LocalDebuggerProcess(fullDebuggerPath, @" --interpreter=vscode"); LocalDebugger.Start(); DebuggerClient = new VSCodeLocalDebuggerClient(LocalDebugger.Input, LocalDebugger.Output); } else { throw new System.Exception(); } Xunit.Assert.True(DebuggerClient.DoHandshake(5000)); var Script = new ControlScript(Env.SourceFilesPath, DebuggerClient.Protocol); new ControlPart().Run(Script, DebuggerClient, Env); }
void Start() { control = GameObject.Find("Control").GetComponent <ControlScript>(); MainPathTo_Save_Load = Application.dataPath; if (Application.platform == RuntimePlatform.OSXPlayer) { MainPathTo_Save_Load += "/../../"; } else if (Application.platform == RuntimePlatform.WindowsPlayer) { MainPathTo_Save_Load += "/../"; } }
// Use this for initialization void Awake() { //singleton if (Instance != null && Instance != this) { Destroy(Instance); } Instance = this; GetScripts (); OnLevelWasLoaded (); timeManager = GetComponent<TimeManager> (); camSpot = Camera.main.GetComponent<Camspot> (); }
void Start() { float offsetW = Screen.width / 4; float offsetH = Screen.height /4; float boxHeight = 50; box = new Rect(Screen.width / 6, Screen.height / 6, Screen.width *2/ 3, Screen.height * 2 / 3); scoreBox = new Rect(Screen.width / 2f - offsetW, Screen.height / 2f - offsetH, Screen.width * 0.5f, boxHeight); hitBox = new Rect(Screen.width / 2f - offsetW, Screen.height / 2f - offsetH + boxHeight, Screen.width * 0.5f, boxHeight); timeBox = new Rect(Screen.width / 2f - offsetW, Screen.height / 2f - offsetH + boxHeight*2, Screen.width * 0.5f, boxHeight); ratioBox = new Rect(Screen.width / 2f - offsetW, Screen.height / 2f - offsetH + boxHeight*3, Screen.width * 0.5f, boxHeight); playAgain =new Rect(Screen.width / 2f - offsetW, Screen.height / 2f - offsetH + boxHeight*4, Screen.width * 0.5f, boxHeight); quitButton =new Rect(Screen.width / 2f - offsetW, Screen.height / 2f - offsetH + boxHeight*5, Screen.width * 0.5f, boxHeight); script = GameObject.Find ("Control").GetComponent<ControlScript>(); }
// Use this for initialization void Start() { hud = (GameObject) Instantiate(hudPrefab);//, //transform.position + new Vector3(offset.x, offset.y, 0.0f), //Quaternion.identity); GameObject canvas = GameObject.Find("Canvas"); hud.transform.SetParent(canvas.transform, true); overeaten = hud.GetComponentInChildren<Text> (); overeaten.enabled = false; //value = -1; UpdateValue(0); yeti = GetComponent<ControlScript>(); }
// Use this for initialization void Start() { hud = (GameObject)Instantiate(hudPrefab); //, //transform.position + new Vector3(offset.x, offset.y, 0.0f), //Quaternion.identity); GameObject canvas = GameObject.Find("Canvas"); hud.transform.SetParent(canvas.transform, true); overeaten = hud.GetComponentInChildren <Text> (); overeaten.enabled = false; //value = -1; UpdateValue(0); yeti = GetComponent <ControlScript>(); }
void OnTriggerEnter2D(Collider2D other) { ControlScript yeti = other.gameObject.GetComponent <ControlScript>(); if (yeti != null) { // this is the yeti, heal him yeti.ActivateShelter(this); } else { // convert to meal VictimScript victim = other.gameObject.GetComponent <VictimScript>(); if (victim != null) { meal += victim.meal; victim.meal = 0.0f; Destroy(other.gameObject); } } }
void OnTriggerEnter(Collider player) { var tag = player.gameObject.tag; Debug.Log("col"); if (tag == "Player") { ControlScript script = player.gameObject.GetComponent("ControlScript") as ControlScript; switch (type) { case "axe": Debug.Log("player"); manager.axe.transform.localScale = new Vector3(1.5F, 1.5F, 1.5F); // manager.axe.transform.rotation = Quaternion.Euler(0, 100, 0); script.pick(manager.axe, col); script.equip(manager.axe); manager.setState(2); break; case "gun": Debug.Log("gunnnnnnnnnnn"); manager.axe.SetActive(false); manager.gun.transform.localScale = new Vector3(0.2F, 0.2F, 0.2F); script.pick(manager.gun, col); script.equipGun(manager.gun); manager.setState(5); break; default: script.pickwood(); this.gameObject.SetActive(false); manager.setState(3); break; } } }
// Use this for initialization void Start() { paused = false; pausemenupanel = transform.FindChild("PauseMenuPanel").gameObject; controlscript = gameObject.GetComponentInParent<ControlScript> (); }
void Start() { playerLeftHand = GameObject.Find("13_Hand_Left"); playerRightHand = GameObject.Find("23_Hand_Right"); playerScript = GetComponent <ControlScript> (); }
public override void InitializeAgent() { sensor = sensorSuite.GetComponent <SensorSuite>(); controlScript = this.GetComponent <ControlScript>(); }
void OnEnable() { ControlScript.CreateDot(gameObject);//call the event }
static int Main(string[] args) { var cli = new CLInterface(args); DebuggerClient debugger = null; ControlScript script = null; LocalDebuggerProcess localDebugger = null; if (cli.NeedHelp) { cli.PrintHelp(); return(1); } if (cli.ClientInfo == null) { Console.Error.WriteLine("Please define client type"); return(1); } try { switch (cli.Protocol) { case ProtocolType.MI: switch (cli.ClientInfo.Type) { case ClientType.Local: var localClientInfo = (LocalClientInfo)cli.ClientInfo; localDebugger = new LocalDebuggerProcess( localClientInfo.DebuggerPath, @" --interpreter=mi"); localDebugger.Start(); debugger = new MILocalDebuggerClient(localDebugger.Input, localDebugger.Output); break; case ClientType.Tcp: var tcpClientInfo = (TcpClientInfo)cli.ClientInfo; debugger = new MITcpDebuggerClient(tcpClientInfo.Addr, tcpClientInfo.Port); break; default: Console.Error.WriteLine("Only tcp and local debuggers are supported now"); return(1); } break; case ProtocolType.VSCode: switch (cli.ClientInfo.Type) { case ClientType.Local: var localClientInfo = (LocalClientInfo)cli.ClientInfo; localDebugger = new LocalDebuggerProcess( localClientInfo.DebuggerPath, @" --interpreter=vscode"); localDebugger.Start(); debugger = new VSCodeLocalDebuggerClient(localDebugger.Input, localDebugger.Output); break; case ClientType.Tcp: var tcpClientInfo = (TcpClientInfo)cli.ClientInfo; debugger = new VSCodeTcpDebuggerClient(tcpClientInfo.Addr, tcpClientInfo.Port); break; default: Console.Error.WriteLine("Only tcp and local debuggers are supported now"); return(1); } break; default: Console.Error.WriteLine("Only GDB/MI and VSCode protocols is supported now"); return(1); } } catch { Console.Error.WriteLine("Can't create debugger client"); if (localDebugger != null) { localDebugger.Close(); } return(1); } if (!debugger.DoHandshake(5000)) { Console.Error.WriteLine("Handshake is failed"); debugger.Close(); if (localDebugger != null) { localDebugger.Close(); } return(1); } try { script = new ControlScript(cli.Environment.SourceFilesPath, debugger.Protocol); } catch (ScriptNotBuiltException e) { Console.Error.WriteLine("Script is not built:"); Console.Error.WriteLine(e.ToString()); debugger.Close(); if (localDebugger != null) { localDebugger.Close(); } return(1); } try { new ControlPart().Run(script, debugger, cli.Environment); Console.WriteLine("Success: Test case \"{0}\" is passed!!!", cli.Environment.TestName); } catch (System.Exception e) { Console.Error.WriteLine("Script running is failed. Got exception:\n" + e.ToString()); debugger.Close(); if (localDebugger != null) { localDebugger.Close(); } return(1); } debugger.Close(); if (localDebugger != null) { localDebugger.Close(); } return(0); }
// Use this for initialization void Start() { control = gameObject.GetComponent<ControlScript>(); }
void OnDisable() { ControlScript.DeleteDot(gameObject);//call the event }
// Use this for initialization void Start() { ControlScript.parts[1] = this.gameObject; //ControlScript.parts.Add(this.gameObject); control_S = (ControlScript)controller.GetComponent<ControlScript>(); }
// Use this for initialization // public void ResetTempPowerLine(){ // tempPowerLine = null; // PlacingPowerline = false; // } void Start() { control = GameObject.Find("Control").GetComponent<ControlScript>(); objectEditor = GameObject.Find("ObjectEditor"); }
// Use this for initialization void Start() { Controls= GetComponent<ControlScript>(); }
void makeOK() { ok = true; carControlExternalScript = customprefab.GetComponent <ControlScript>(); }
void Start() { cs = (ControlScript)FindObjectOfType(typeof(ControlScript)); }
// Use this for initialization void Start() { control = gameObject.GetComponent <ControlScript>(); }
// Use this for initialization void Start() { playerobject = GameObject.FindGameObjectWithTag ("Player1"); controlscript = playerobject.GetComponent<ControlScript> (); }