Beispiel #1
0
        void Awake()
        {
            Instance  = this;
            buildMode = true;

            player = GameObject.Find("Player");
            head   = GameObject.Find("Head");

            //selectedObject.tag = "Layer01";

            selectedObjectcolour = Color.red;
        }
Beispiel #2
0
        // Use this for initialization
        private void Start()
        {
            spawnPrefab = appManager.GetComponent <SpawnPrefab>();

            strafe      = 0.25f;
            moveUp      = 1f;
            moveForward = 0.2f;

            SetupPlayer();

            crouch  = false;
            flyMode = true;

            SwitchToPlayer();

            tempColor = Color.white;

            // testing clamping
            xMax      = 50;
            xMin      = -50;
            yMax      = 50;
            yMin      = -50;
            zMin      = -50;
            zMax      = 50;
            heightMin = 0;
            heightMax = 50;

            pixels  = tex.GetPixels32();
            cWidth  = tex.width;
            cHeight = tex.height;

            headRot   = head.transform.rotation;
            playerRot = player.transform.rotation;

            canSpawn = true;

            RemoveHighlightColour();

            playerGeometry.SetActive(false);
        }