Jump to content
This site uses cookies! Learn More

This site uses cookies!

armedunity.com uses cookies to improve user experience.

By continuing to use this site, you agree to allow us to store cookies on your computer.

swarleynine

Member
  • Content Count

    42
  • Joined

  • Last visited

Community Reputation

5 Neutral

1 Follower

About swarleynine

  • Rank
    Member
  1. This was a project created for my software class. We were to try to recreate a popular mobile game as best as possible but with our own twist and this was what i came up with http://www.windowsphone.com/en-gb/store/app/flappy-pilot/f4c26328-1a98-4c15-a582-80b150eea23d
  2. Thanks anyway i think it may be a issue with windowsphone
  3. Mouse and it used to work on another project on my phone fine, Now no matter what i try it just wont respond
  4. I'm having a problem with a mobile game I'm developing no matter what I do i cant manage to get the drag rigidbody script to work on my Lumia however it works fine on my PC. I've attached my very small project and would appreciate it if someone could let me know what I'm doing wrong https://drive.google.com/file/d/0BxHJNoEO6ZJsNXlMZDIyVmhZMjg/edit?usp=sharing Here's the link
  5. The script is added to a colider but yet it is still not recognized
  6. swarleynine

    OnMouseDown

    I can't seem to get this script to work any more it used to work fine in other projects. There's a drag rididbody in the scene if that helps. void OnMouseDown() { Debug.Log ("On Mouse Down Event!!!!!!!!!"); }
  7. I'm trying to write some code to chop down a terrain tree but so far i can't seem to get the tree's to be destroyed. using UnityEngine; using System.Collections; public class dsf : MonoBehaviour { public GameObject DeadReplace; void Cut() { TerrainData terrain = Terrain.activeTerrain.terrainData; ArrayList instances = new ArrayList(); foreach (TreeInstance tree in terrain.treeInstances) { float distance = Vector3.Distance(Vector3.Scale(tree.position, terrain.size) + Terrain.activeTerrain.transform.position, transform.position); GameObject dead = Instantiate(DeadReplace, Vector3.Scale(tree.position, terrain.size) + Terrain.activeTerrain.transform.position, Quaternion.identity) as GameObject; Destroy(gameObject); } } void OnMouseDown() { Cut(); } }
  8. This is a simple horror game I've been working on at the moment its similar to slender but in future builds that will change Video
  9. Could someone please help me translate this into javascript? if its even possible using UnityEngine; using System.Collections; public class InventoryGUI : MonoBehaviour { private BlockSet blockSet; private Builder builder; private bool show = false; private Vector2 scrollPosition = Vector3.zero; // Use this for initialization void Awake () { Map map = (Map) GameObject.FindObjectOfType( typeof(Map) ); blockSet = map.GetBlockSet(); builder = (Builder) GameObject.FindObjectOfType( typeof(Builder) ); } // Update is called once per frame void Update () { if( Input.GetKeyDown(KeyCode.E) && GUIManager.IsPlaying ) { show = !show; Screen.showCursor = show; Screen.lockCursor = !show; } } public GUISkin _GuiSkin = null; void OnGUI() { GUI.skin = _GuiSkin; if(show) { Rect window = new Rect(0, 50, Screen.width*0.5f, Screen.height*0.15f); window.center = new Vector2(Screen.width, Screen.height)/2f; GUILayout.Window(0, window, DoInventoryWindow, "Inventory"); } } private void DoInventoryWindow(int windowID) { Block selected = builder.GetSelectedBlock(); selected = DrawInventory(blockSet, ref scrollPosition, selected); builder.SetSelectedBlock(selected); } private static Block DrawInventory(BlockSet blockSet, ref Vector2 scrollPosition, Block selected) { scrollPosition = GUILayout.BeginScrollView(scrollPosition); for(int index=0, y=0; index<blockSet.GetCount(); y++) { GUILayout.BeginHorizontal(); for(int x=0; x<8; x++, index++) { Block block = blockSet.GetBlock(index); if( DrawBlock(block, block == selected && selected != null) ) { selected = block; } } GUILayout.EndHorizontal(); } GUILayout.EndScrollView(); return selected; } private static bool DrawBlock(Block block, bool selected) { Rect rect = GUILayoutUtility.GetAspectRect(1f); if(selected) { GUI.Box(rect, GUIContent.none); } Vector3 center = rect.center; rect.width -= 5; rect.height -= 2; rect.center = center; if(block != null) return block.DrawPreview(rect); return false; } } I know its asking alot
  10. Done some research with the old google, Its a bug with the current unity build, Something to do your project containing precompiled assemblies
  11. It works but only if i disable anti aliasing
  12. It just crashes D: when i switch
  13. =.= thats what i ment it wont run full screen from the dialog box or from code D:
×
×
  • Create New...