Ejemplo n.º 1
0
 void Start()
 {
     Debug.Log("start");
     cam         = GetComponent <Camera>();
     touchable   = true;
     Controllers = FindObjectOfType <ControllerScript>();
 }
Ejemplo n.º 2
0
    // Update is called once per frame
    void Update()
    {
        GameObject       gameManager = GameObject.Find("GameManager");
        ControllerScript cs          = gameManager.GetComponent <ControllerScript>();
        float            sleepLevel  = cs.sleepLevel;

        t = cs.t;

        if (sleepLevel >= 3)
        {
            if (spot.spotAngle > 35f)
            {
                spot.spotAngle -= Time.deltaTime;
            }
            sun.intensity -= Time.deltaTime / 5f;
        }
        else
        {
            spot.spotAngle = 120f;
            sun.intensity  = 5f;
        }

        if (sleepLevel >= 4)
        {
            meetingLight.light.intensity -= Time.deltaTime;
        }
    }
Ejemplo n.º 3
0
    // Use this for initialization
    void Start()
    {
        OnScreenUpperLeftCorner  = UpperLeftCorner.GetComponent <RectTransform>().position; //Get the 2 locations
        OnScreenLowerRightCorner = LowerRightCorner.GetComponent <RectTransform>().position;

        controller     = GameObject.Find("Controller").GetComponent <ControllerScript>();
        onScreenSize   = OnScreenLowerRightCorner - OnScreenUpperLeftCorner; //Calculate how much 1 pixel is in coordinates in the next couple of liens.
        deltaLatitude  = lowerRightLatitude - upperLeftLatitude;
        deltaLongitude = lowerRightLongitude - upperLeftLongitude;
        deltaWidth     = OnScreenLowerRightCorner.x - OnScreenUpperLeftCorner.x;
        deltaHeight    = OnScreenLowerRightCorner.y - OnScreenUpperLeftCorner.y;

        pixelSize.x = (float)(deltaWidth / deltaLongitude);
        pixelSize.y = (float)(deltaHeight / deltaLatitude);


        controller = GameObject.Find("Controller").GetComponent <ControllerScript>();
        for (int i = 0; i < controller.miniGPSDatabase.Length; i++)
        {
            if (controller.miniGPSDatabase[i] != null && controller.miniGPSDatabase[i] != "")
            {
                PlaceMarker(controller.miniGPSDatabase[i]); //Go through all the scanned stickers, and place a marker for each one of them.
            }
        }
        GPSLocation(); //Doesn't work because I don't even know why
        //PlaceMarker("52.360345 4.873639"); a test line.
    }
    private Transform tHUDPUMeterBar; //the bar in the powerup meter on HUD

    void Start()
    {
        tPlayer = transform;

        //powerup meter visual
        tHUDPUMeter    = GameObject.Find("HUDMainGroup/HUDPUMeter").GetComponent <Transform>() as Transform;
        tHUDPUMeterBar = GameObject.Find("HUDMainGroup/HUDPUMeter/HUD_PU_Meter_Bar_Parent").GetComponent <Transform>() as Transform;

        iPowerupCount = System.Enum.GetNames(typeof(PowerUps)).Length - 1; //PowerUps.GetValues(PowerUps).Length-1;//get the total number of powerups

        bPowerupStatus        = new bool[iPowerupCount];
        fPowerupStartTime     = new float[iPowerupCount];
        fPowerupTotalDuration = new float[iPowerupCount];

        hInGameScript     = this.GetComponent <InGameScript>() as InGameScript;
        hControllerScript = this.GetComponent <ControllerScript>() as ControllerScript;
        hSoundManager     = GameObject.Find("SoundManager").GetComponent <SoundManager>() as SoundManager;

        tHUDPUMeter.transform.position -= new Vector3(0, 100, 0); //hide the powerup meter
        fMagnetismDefaultRadius         = 200;
        fMangetismRadius = 200;                                   //default: pull currency toward the character
        iCurrencyUnits   = 0;

        for (int i = 0; i < iPowerupCount; i++)
        {
            bPowerupStatus[i]        = false;
            fPowerupTotalDuration[i] = 10.0f;    //active time duration of the powerups
        }
    }
Ejemplo n.º 5
0
    // Use this for initialization
    void Start()
    {
        controller = GameObject.Find("Controller").GetComponent <ControllerScript>();
        electronic = controller.findStickerScene[0];
        other      = controller.findStickerScene[1];
        big        = controller.findStickerScene[2];

        int a = 0;

        if (electronic && !other)
        {
            a += 4;
        }
        if (big)
        {
            a += 2;
        }

        image1.GetComponent <Image>().sprite         = sprites[a];
        image2.GetComponent <Image>().sprite         = sprites[a + 1];
        image1.GetComponent <Image>().preserveAspect = true;
        image2.GetComponent <Image>().preserveAspect = true;
        image1.GetComponent <StickerScript>().type  += a;
        image2.GetComponent <StickerScript>().type  += a + 1;

        image1.GetComponentInChildren <Text>().text = texts[a];
        image2.GetComponentInChildren <Text>().text = texts[a + 1];
    }
    public override void DoStep()
    {
        switch (state)
        {
        // Search Goal!
        case 0:
            if (robot.foundGoal)     // found goal
            {
                // change state
                state = 1;
                robot.SetTargetLocation(robot.rb.position);
            }
            else if (!robot.moving)     // reached targetLocation
            {
                // move to new location
                Vector2 pos = ControllerScript.RandomOuterPosition(5, 20);
                robot.SetTargetLocation(new Vector3(pos.x, 0, pos.y));
            }
            break;

        // Found Goal!
        case 1:
            robot.Broadcast <Vector3>(new Message <Vector3>(robot.goalPosition, 0));   // Share Goal Position
            BuildNet();
            break;
        }
    }
Ejemplo n.º 7
0
 void Start()
 {
     initialPosition = transform.localPosition;
     //UpDown = new Vector3(0, 0, 1);
     upDown = 0.5f;
     Joystick = GameObject.Find("N_ThirdPersonPlayer").GetComponent<ControllerScript>();
 }
Ejemplo n.º 8
0
    public override void OnInspectorGUI()
    {
        base.OnInspectorGUI();

        ControllerScript script = (ControllerScript)target;

        GUIContent controllerType = new GUIContent("Controller Type");

        script.controllerTypeIndex = EditorGUILayout.Popup(controllerType, script.controllerTypeIndex, script.controllerTypeList);

        GUIContent aButton = new GUIContent("A Button");
        GUIContent bButton = new GUIContent("B Button");
        GUIContent cButton = new GUIContent("C Button");
        GUIContent dButton = new GUIContent("D Button");

        string[] list;
        if (script.controllerTypeIndex == 0)
        {
            list = script.manager.buttonNameLists[0].ToArray();
        }
        else if (script.controllerTypeIndex == 1)
        {
            list = script.manager.buttonNameLists[1].ToArray();
        }
        else
        {
            list = script.manager.buttonNameLists[2].ToArray();
        }

        script.aButtonIndex = EditorGUILayout.Popup(aButton, script.aButtonIndex, list);
        script.bButtonIndex = EditorGUILayout.Popup(bButton, script.bButtonIndex, list);
        script.cButtonIndex = EditorGUILayout.Popup(cButton, script.cButtonIndex, list);
        script.dButtonIndex = EditorGUILayout.Popup(dButton, script.dButtonIndex, list);
    }
Ejemplo n.º 9
0
    private void ShowButton()
    {
        if (this.gameObject.transform.parent.name.Equals("ShowKarte(Clone)"))
        {
            if (ControllerScript.GetAdminMode())
            {
                if (!editButton.activeSelf)
                {
                    editButton.SetActive(true);
                }

                if (!deleteButton.activeSelf)
                {
                    deleteButton.SetActive(true);
                }
            }
            else
            {
                if (editButton.activeSelf)
                {
                    editButton.SetActive(false);
                }

                if (deleteButton.activeSelf)
                {
                    deleteButton.SetActive(false);
                }
            }
        }
    }
Ejemplo n.º 10
0
    // Update is called once per frame
    void Update()
    {
        Vector3 PlayerCenterPos = Vector3.zero;

        ControllerScript ctrl = Player.GetComponent <ControllerScript>();

        PlayerCenterPos = Player.transform.position;
        float speed = ctrl.currentSpeed;

        speed -= ctrl.NormalSpeed;
        if (speed > 0)
        {
            float range = ctrl.MaxSpeed - ctrl.NormalSpeed;
            float T     = speed / range;
            gameObject.GetComponent <Camera>().orthographicSize = Mathf.SmoothDamp(gameObject.GetComponent <Camera>().orthographicSize, Mathf.Lerp(NormalSize, FastSize, T), ref CurrentZoomVelocity, ZoomDamp);
            //gameObject.GetComponent<Camera>().orthographicSize = Mathf.Lerp(NormalSize, FastSize, T);
        }
        else
        {
            gameObject.GetComponent <Camera>().orthographicSize = Mathf.SmoothDamp(gameObject.GetComponent <Camera>().orthographicSize, NormalSize, ref CurrentZoomVelocity, ZoomDamp);
            //gameObject.GetComponent<Camera>().orthographicSize = NormalSize;
        }

        PlayerCenterPos    = Player.transform.position;
        PlayerCenterPos.z  = transform.position.z;
        transform.position = Vector3.SmoothDamp(transform.position, PlayerCenterPos, ref CurrentCamVelocity, DampTime);
    }
    // Use this for initialization
    void Start()
    {
        phoneField.contentType = InputField.ContentType.DecimalNumber;

        controller = GameObject.Find("Controller").GetComponent <ControllerScript>();
        //This part replaces all the fields's text with previously saved text, if there is any.
        if ((string)controller.names[controller.currentUser] != "")
        {
            nameField.text = (string)controller.names[controller.currentUser] + "";
        }
        if ((string)controller.surnames[controller.currentUser] != "")
        {
            surnameField.text = (string)controller.surnames[controller.currentUser] + "";
        }
        if ((string)controller.phoneNumbers[controller.currentUser] != "")
        {
            phoneField.text = (string)controller.phoneNumbers[controller.currentUser] + "";
        }
        if ((string)controller.adresses[controller.currentUser] != "")
        {
            addressField.text = (string)controller.adresses[controller.currentUser] + "";
        }
        if ((string)controller.zipCodes[controller.currentUser] != "")
        {
            zipField.text = (string)controller.zipCodes[controller.currentUser] + "";
        }
    }
 // Use this for initialization
 void Start()
 {
     Instance = this;
     //GameOver = true;
     //MainMenu.gameObject.SetActive(true);
     //Player.SetActive(false);
 }
Ejemplo n.º 13
0
 private void Start()
 {
     rb                    = GetComponent <Rigidbody>();
     distscript            = FindObjectOfType <DistanceFromGoal>();
     controller            = FindObjectOfType <ControllerScript>();
     rb.maxAngularVelocity = 1000f;
 }
Ejemplo n.º 14
0
 void Start()
 {
     rotateAmount     = 0;
     frameCount       = 0;
     status           = false;
     controllerScript = GameObject.FindWithTag("controller").GetComponent <ControllerScript>();
 }
Ejemplo n.º 15
0
    private void Start()
    {
        controller = GetComponent <ControllerScript>();
        lazer      = GameObject.CreatePrimitive(PrimitiveType.Cube);
        lazer.GetComponent <BoxCollider>().isTrigger = true;
        lazer.name                    = transform.name + " - Lazer";
        lazer.transform.parent        = transform;
        lazer.transform.localRotation = Quaternion.Euler(0, 0, 0);


        lazer.GetComponent <Renderer>().material.color = lazerColour;

        lazer.AddComponent <Rigidbody>().isKinematic = true;

        targetPoint                         = new GameObject();
        targetPoint.name                    = "Target Point";
        targetPoint.transform.parent        = lazer.transform;
        targetPoint.transform.localRotation = Quaternion.Euler(0, 0, 0);

        sim      = new GameObject().AddComponent <Rigidbody>();
        sim.name = "sim";

        controller = GetComponent <ControllerScript>();
        lr         = GetComponent <LineRenderer>();
        lr.enabled = false;
    }
Ejemplo n.º 16
0
 void Start()
 {
     rect = new Rect(new Vector2(GetComponent <RectTransform>().position.x - GetComponent <RectTransform>().rect.width / 2, GetComponent <RectTransform>().position.y - GetComponent <RectTransform>().rect.height / 2), new Vector2(GetComponent <RectTransform>().rect.width, GetComponent <RectTransform>().rect.height));
     masterControllerScript = GameObject.Find("EventSystem").GetComponent <ControllerScript> ();
     masterControllerScript.inventoryUI [rectIndex]       = rect;
     masterControllerScript.inventoryUIObject [rectIndex] = gameObject;
 }
Ejemplo n.º 17
0
    // 공격범위 및 판정 함수
    private void OnTriggerEnter2D(Collider2D other)
    {
        if (other.gameObject.tag == "Enemy")
        {
            ControllerScript _player   = GameObject.FindWithTag("Player").GetComponent <ControllerScript>();
            EnemyControl     enemyCtrl = other.gameObject.GetComponent <EnemyControl>(); // 충돌한 오브젝트의 스크립트 받음
            float            damage    = 0;

            if (gameObject.name == "FAttackBound")
            {
                damage = _player.attackDamage[0];
            }
            else if (gameObject.name == "SAttackBound")
            {
                damage = _player.attackDamage[1];
            }
            else if (gameObject.name == "TAttackBound")
            {
                damage = _player.attackDamage[2];
            }
            else
            {
                damage = 0f;
            }

            enemyCtrl.HP -= damage;
        }
    }
Ejemplo n.º 18
0
 private void Start()
 {
     sim                  = new GameObject().AddComponent <Rigidbody>();
     sim.name             = "sim";
     sim.transform.parent = transform.parent;
     controller           = GetComponent <ControllerScript>();
 }
Ejemplo n.º 19
0
    void Start()
    {
        bSidesColliderFlag = true;

        hInGameScript = GameObject.Find("Player").GetComponent <InGameScript>() as InGameScript;
        hPlayerFrontColliderScript = GameObject.Find("PlayerFrontCollider").GetComponent <PlayerFrontColliderScript>() as PlayerFrontColliderScript;
        hControllerScript          = GameObject.Find("Player").GetComponent <ControllerScript>() as ControllerScript;
    }
Ejemplo n.º 20
0
 void Start()
 {
     status           = false;
     frameCount       = 0;
     actionAmount     = 0;
     controllerScript = GameObject.FindWithTag("controller").GetComponent <ControllerScript>();
     gameObject.transform.eulerAngles = new Vector3(0, 0, 0);
 }
Ejemplo n.º 21
0
 // Use this for initialization
 void Awake()
 {
     controller = GameObject.Find("Controller").GetComponent <ControllerScript>();
     if (GetComponent <Button>() != null)
     {
         GetComponent <Button>().onClick.AddListener(() => { ButtonClick(); });
     }
 }
Ejemplo n.º 22
0
    void Start()
    {
        tPlayer          = GameObject.Find("Player").transform;
        bPitFallingStart = false;

        hInGameScript     = this.GetComponent <InGameScript>() as InGameScript;
        hControllerScript = this.GetComponent <ControllerScript>() as ControllerScript;
    }
Ejemplo n.º 23
0
 void OnTriggerEnter2D(Collider2D col)
 {
     ControllerScript.win();
     if (col.gameObject.tag == "Cup")
     {
         Destroy(gameObject);
     }
 }
Ejemplo n.º 24
0
 // Use this for initialization
 void Start()
 {
     instances          = new List <GameObject>();
     followerCountLabel = GameObject.FindGameObjectWithTag("Score").GetComponent <Text>();
     cntrllr            = GameObject.FindGameObjectWithTag("Controller").GetComponent <ControllerScript>();
     cs = GameObject.FindGameObjectWithTag("Collector").GetComponent <CollectorScript>();
     UpdateUILabel();
 }
Ejemplo n.º 25
0
    void Awake()
    {
        controllerScript              = GameObject.Find("Main Camera").GetComponent <ControllerScript>();
        snowball                      = GameObject.Find("Snowball");
        snowballLaserScript           = (CatLaserScript)snowball.GetComponent(typeof(CatLaserScript));
        snowballLaserScript.enabled   = false;
        snowballRigidBody             = snowball.GetComponent <Rigidbody>();
        snowballRigidBody.isKinematic = true;
        snowballAudioSource           = snowball.GetComponent <AudioSource>();
        snowballAnim                  = snowball.GetComponent <Animator>();
        introHash                     = Animator.StringToHash("Intro");
        laserPointer                  = GameObject.Find("LaserPointer");
        laserPointer.SetActive(false);
        balls = GameObject.FindGameObjectsWithTag("Ball");
        foreach (GameObject ball in balls)
        {
            ball.SetActive(false);
        }
        blocks = GameObject.FindGameObjectsWithTag("Block");
        foreach (GameObject block in blocks)
        {
            block.SetActive(false);
        }
        snowballBedRigidBody             = GameObject.Find("SnowballBed").GetComponent <Rigidbody>();
        snowballBedRigidBody.isKinematic = true;
        mainSongAudioSource  = GameObject.Find("MainSong").GetComponent <AudioSource>();
        introSongAudioSource = GameObject.Find("IntroSong").GetComponent <AudioSource>();
        introSongAudioSource.Play();
        pointLight           = GameObject.Find("PointLight").GetComponent <Light>();
        pointLight.intensity = 0;
        crosshair            = GameObject.Find("Crosshair");
        crosshair.SetActive(false);
        iconController = GameObject.Find("Icon Controller");
        iconController.SetActive(false);
        icons = GameObject.FindGameObjectsWithTag("Icon");
        foreach (GameObject icon in icons)
        {
            icon.SetActive(false);
        }
        quads = GameObject.FindGameObjectsWithTag("Quad");
        foreach (GameObject quad in quads)
        {
            quad.SetActive(false);
        }

        pathPointGameObjects = GameObject.FindGameObjectsWithTag("PathPoint");
        pathPointTransforms  = new Transform[pathPointGameObjects.Length];
        for (int i = 0; i < pathPointTransforms.Length; i++)
        {
            pathPointTransforms[int.Parse(pathPointGameObjects[i].name.Substring(9, 1))] = pathPointGameObjects[i].transform;
        }
        currPathPoint     = 0;
        targetPathPoint   = null;
        pathFinished      = false;
        introSongFinished = false;

        snowballAnim.Play(introHash);
    }
Ejemplo n.º 26
0
    // Use this for initialization
    void Start()
    {
        controller = GameObject.Find("Controller").GetComponent <ControllerScript>();
        electronic = controller.buyElectronic;
        if (electronic)
        {
            GetComponent <Image>().sprite = sprites[1];
            for (int i = 0; i < stickerButtons.Length; i++)
            {
                stickerButtons[i].GetComponent <Image>().sprite = electricButtonSprites[i];
                switch (i)
                {
                case 0:
                    stickerButtons[i].GetComponent <StickerScript>().type = 4;
                    break;

                case 1:
                    stickerButtons[i].GetComponent <StickerScript>().type = 6;
                    break;

                case 2:
                    stickerButtons[i].GetComponent <StickerScript>().type = 5;
                    break;

                case 3:
                    stickerButtons[i].GetComponent <StickerScript>().type = 7;
                    break;
                }
            }
        }
        else
        {
            GetComponent <Image>().sprite = sprites[0];
            for (int i = 0; i < stickerButtons.Length; i++)
            {
                stickerButtons[i].GetComponent <Image>().sprite = normalButtonSprites[i];
                switch (i)
                {
                case 0:
                    stickerButtons[i].GetComponent <StickerScript>().type = 0;
                    break;

                case 1:
                    stickerButtons[i].GetComponent <StickerScript>().type = 2;
                    break;

                case 2:
                    stickerButtons[i].GetComponent <StickerScript>().type = 1;
                    break;

                case 3:
                    stickerButtons[i].GetComponent <StickerScript>().type = 3;
                    break;
                }
            }
        }
    }
Ejemplo n.º 27
0
    void Start()
    {
        tPlayer = GameObject.Find("Player").transform;
        tEnemy  = this.transform;

        hInGameScript     = GameObject.Find("Player").GetComponent <InGameScript>() as InGameScript;
        hControllerScript = GameObject.Find("Player").GetComponent <ControllerScript>() as ControllerScript;
        hSoundManager     = GameObject.Find("SoundManager").GetComponent <SoundManager>() as SoundManager;
    }
 // Use this for initialization
 void Start()
 {
     controller = GameObject.Find("ControllerCanvas").GetComponent <ControllerScript>();
     GetComponent <Button>().onClick.AddListener(() => { ButtonClick(); });
     //add ButtonClick to button click method.if (buttonType == ButtonTypes.a0 || buttonType == ButtonTypes.a1)
     {
         //transform.GetChild(0).GetComponent<RectTransform>().sizeDelta = new Vector2(0, 80); //Todo, fix this later.
     }
 }
Ejemplo n.º 29
0
 void Start()
 {
     masterControllerScript = GameObject.Find("EventSystem").GetComponent <ControllerScript> ();
     previousPosition       = transform.position;
     updateSprite();
     rect       = new Rect(new Vector2(GetComponent <RectTransform>().position.x - GetComponent <RectTransform>().rect.width / 2, GetComponent <RectTransform>().position.y - GetComponent <RectTransform>().rect.height / 2), new Vector2(GetComponent <RectTransform>().rect.width, GetComponent <RectTransform>().rect.height));
     parentRect = new Rect(new Vector2(transform.parent.GetComponent <RectTransform>().position.x - transform.parent.GetComponent <RectTransform>().rect.width / 2, transform.parent.GetComponent <RectTransform>().position.y - transform.parent.GetComponent <RectTransform>().rect.height / 2), new Vector2(transform.parent.GetComponent <RectTransform>().rect.width, transform.parent.GetComponent <RectTransform>().rect.height));
     playerInv  = masterControllerScript.playerInventoryScript.playerInventory;
 }
Ejemplo n.º 30
0
 void Start()
 {
     status  = false;
     action  = Action.IDLE;
     swinger = gameObject.transform.Find("SwingPivot");
     gameObject.transform.position    = new Vector3(5.15f, 0.7f, 2.3f);
     gameObject.transform.eulerAngles = new Vector3(0, -100, 0);
     controllerScript = GameObject.FindWithTag("controller").GetComponent <ControllerScript>();
 }
Ejemplo n.º 31
0
 void Start()
 {
     status     = false;
     frameCount = 0;
     gameObject.transform.position    = new Vector3(56, 0.25f, -3);
     gameObject.transform.eulerAngles = new Vector3(0, 0, 0);
     controllerScript = GameObject.FindWithTag("controller").GetComponent <ControllerScript>();
     animController   = GetComponent <Animator>();
 }
Ejemplo n.º 32
0
 void Start()
 {
     //weaponScript = transform.Find("Weapon").GetComponent<WeaponScript>();
     weaponScript = GetComponentInChildren<WeaponScript>();
     Joystick = GetComponent<ControllerScript>();
     healthObject = GameObject.Find("Health");
     pauseObject = GameObject.Find("PauseMenu").transform.Find("Menu").gameObject;
     Controller = transform.GetComponent<CharacterController>();
     characterAnimator = GetComponentInChildren<Animator>();
     cameraObject = GameObject.Find("Camera Object");
 }
Ejemplo n.º 33
0
 void Start()
 {
     m_Cs = GameObject.FindGameObjectWithTag("Player").GetComponent<ControllerScript>();
     m_Hud = GameObject.Find("HUD").GetComponent<HudScript>();
 }
Ejemplo n.º 34
0
    void Start()
    {
        m_World1 = GameObject.Find("World1");
        m_World2 = GameObject.Find("World2");
        m_PlayerCS = GameObject.FindGameObjectWithTag("Player").GetComponent<ControllerScript>();
        m_ScreenEffet = GameObject.Find("ScreenEffectGlobalScript").GetComponent<ScreenEffectScript>();
        m_PlayerJumper = GameObject.FindGameObjectWithTag("Jumper").GetComponent<JumperScript>();
        Physics.IgnoreLayerCollision(8, 9);

        Physics.IgnoreLayerCollision(10, 8, m_CurrentWorld != 0);
        Physics.IgnoreLayerCollision(10, 9, m_CurrentWorld == 0);

        GameObject[] gos = (GameObject[])FindObjectsOfType(typeof(GameObject));

        foreach (GameObject go in gos)
        {
            if (go.layer == 8 || go.layer == 9)
            {
                if (go.GetComponent<Renderer>() != null)
                {
                    Color c = go.renderer.material.HasProperty("_Color") ? go.renderer.material.color : Color.black;
                    c.a = m_CurrentWorld == 0 && go.layer == 8 || m_CurrentWorld != 0 && go.layer == 9 ? 1.0f : 0.3f;
                    go.renderer.material.color = c;
                }
            }
        }

        m_ScreenEffet.Disable();
    }
Ejemplo n.º 35
0
 void Start()
 {
     Joystick = GetComponent<ControllerScript>();
     camera = Camera.main.transform;
     redFlashObject = GameObject.Find("PauseMenu").transform.Find("RedFlash").gameObject;
     image = redFlashObject.GetComponent<Image>();
     pauseObject = GameObject.Find("PauseMenu").transform.Find("Menu").gameObject;
     base.Start();
 }
Ejemplo n.º 36
0
 // Use this for initialization
 void Start()
 {
     m_Controler = GameObject.Find("Player").GetComponent<ControllerScript>();
 }
Ejemplo n.º 37
0
 // Use this for initialization
 void Start()
 {
     transform.position = new Vector3(transform.position.x, transform.position.y, 0);
     original_position = transform.position;
     original_rotation = transform.rotation;
     rigidbody.isKinematic = true;
     game_controller = GameObject.Find("Controller").GetComponent<ControllerScript>();
 }
Ejemplo n.º 38
0
    void Start()
    {
        m_Body = this.rigidbody;

        if (!m_Body)
        {
            return;
        }

        m_Body.useGravity = false;

        m_ConstForce = gameObject.AddComponent<ConstantForce>();
        SetGravityDir(m_StartDir);
        m_Player = GetComponent<ControllerScript>();
    }
Ejemplo n.º 39
0
 // Use this for initialization
 void Start()
 {
     control = GameObject.Find("Controller").GetComponent<ControllerScript> ();
     rigid = GetComponent<CharacterController> ();
 }