Esempio n. 1
0
 // Use this for initialization
 void Start()
 {
     SetDotTile();
     Move(gameObject.transform.position);
     HideDotTile();
     control = GameObject.Find("Control").GetComponent <ControlScript>();
 }
Esempio n. 2
0
    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);
    }
Esempio n. 3
0
    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);
    }
Esempio n. 4
0
    private void Awake()
    {
        Instance = this;

#if UNITY_IOS
        Application.targetFrameRate = 60;
#endif
    }
Esempio n. 5
0
    // Use this for initialization
    void Start()
    {
        Application.targetFrameRate = 60;
        meshFilter = gameObject.AddComponent <MeshFilter>();
        mesh       = meshFilter.mesh;

        ControlScript.AddShapeChange(StartVMesh);
    }
Esempio n. 6
0
 public ControlInfo(ControlScript script,
                    NetcoreDbgTestCore.Environment env)
 {
     Breakpoints        = script.Breakpoints;
     TestName           = env.TestName;
     SourceFilesPath    = env.SourceFilesPath;
     TargetAssemblyPath = env.TargetAssemblyPath;
     CorerunPath        = env.CorerunPath;
 }
Esempio n. 7
0
    void OnTriggerExit2D(Collider2D other)
    {
        ControlScript yeti = other.gameObject.GetComponent <ControlScript>();

        if (yeti != null)
        {
            yeti.DeactivateShelter();
        }
    }
Esempio n. 8
0
 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>();
 }
Esempio n. 12
0
    //****************************************
    //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
    }
Esempio n. 13
0
 void Start()
 {
     while (true)
     {
         waitOne();
         break;
     }
     carControlExternalScript = customprefab.GetComponent <ControlScript>();
     carControlExternalScript.waitCountDown = true;
 }
Esempio n. 14
0
 public override void Initialize()
 {
     controlscript = GetComponent<ControlScript> ();
     battlegooey = GetComponent<BattleGooey>();
     scenariomanager = GetComponent<ScenarioManager> ();
     Debug.Log (scenariomanager);
     timer = battlegooey.SetTimerTime (totaltimetojump);
     scenariomanager.Initialize ();
     scenariomanager.InitializeScenario ();
 }
Esempio n. 15
0
    // Use this for initialization
    void Start()
    {
        Control  = GameObject.Find("Control").GetComponent <ControlScript>();
        MyCamera = GameObject.Find("Camera");

        if (PlaceObject != null)
        {
            GetComponentInChildren <Text>().text = PlaceObject.name;
        }
    }
Esempio n. 16
0
    /// <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...
    }
Esempio n. 17
0
    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";
    }
Esempio n. 19
0
    void Start()
    {
        Instance = this;
#if !UNITY_EDITOR
        RunOnUiThread(() =>
        {
            Task.Run(async() => { RequestAccessForMediaCaptureAndInit(); });
        });
#endif
        ServerAddressInputField.text = "peercc-server.ortclib.org";
    }
Esempio n. 20
0
    // 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>();
        }
    }
Esempio n. 21
0
    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";
    }
Esempio n. 22
0
        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);
        }
Esempio n. 23
0
 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 += "/../";
     }
 }
Esempio n. 24
0
    // 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> ();
    }
Esempio n. 25
0
 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>();
 }
Esempio n. 26
0
    // 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>();
    }
Esempio n. 27
0
    // 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>();
    }
Esempio n. 28
0
    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);
            }
        }
    }
Esempio n. 29
0
    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;
            }
        }
    }
Esempio n. 30
0
 // Use this for initialization
 void Start()
 {
     paused = false;
     pausemenupanel = transform.FindChild("PauseMenuPanel").gameObject;
     controlscript = gameObject.GetComponentInParent<ControlScript> ();
 }
Esempio n. 31
0
 void Start()
 {
     playerLeftHand  = GameObject.Find("13_Hand_Left");
     playerRightHand = GameObject.Find("23_Hand_Right");
     playerScript    = GetComponent <ControlScript> ();
 }
Esempio n. 32
0
 public override void InitializeAgent()
 {
     sensor        = sensorSuite.GetComponent <SensorSuite>();
     controlScript = this.GetComponent <ControlScript>();
 }
Esempio n. 33
0
 void OnEnable()
 {
     ControlScript.CreateDot(gameObject);//call the event
 }
Esempio n. 34
0
        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>();
 }
Esempio n. 36
0
 void OnDisable()
 {
     ControlScript.DeleteDot(gameObject);//call the event
 }
Esempio n. 37
0
 // 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");
 }
Esempio n. 39
0
 // Use this for initialization
 void Start()
 {
     Controls= GetComponent<ControlScript>();
 }
Esempio n. 40
0
 void makeOK()
 {
     ok = true;
     carControlExternalScript = customprefab.GetComponent <ControlScript>();
 }
Esempio n. 41
0
 void Start()
 {
     cs = (ControlScript)FindObjectOfType(typeof(ControlScript));
 }
Esempio n. 42
0
 // Use this for initialization
 void Start()
 {
     control = gameObject.GetComponent <ControlScript>();
 }
Esempio n. 43
0
 // Use this for initialization
 void Start()
 {
     playerobject = GameObject.FindGameObjectWithTag ("Player1");
     controlscript = playerobject.GetComponent<ControlScript> ();
 }