Exemplo n.º 1
0
 void OnEnable()
 {
     gui = GameObject.FindGameObjectWithTag("GUI").GetComponent <GUI_HUD>();
     playerController = GetComponent <PlayerController>();
     health           = maxHealth;
     LevelUp();
 }
Exemplo n.º 2
0
    // Use this for initialization
    void Start()
    {
        loader      = FindObjectOfType(typeof(loadingScript)) as loadingScript;
        playerName  = OuyaSDK.OuyaPlayer.player1;
        Hawes       = GetComponent(typeof(CharacterController)) as CharacterController;
        startScript = FindObjectOfType(typeof(StartScript)) as StartScript;
        gui         = FindObjectOfType(typeof(GUI_HUD)) as GUI_HUD;
        HandNull    = GameObject.FindGameObjectWithTag("HandNull").transform;

        Character.renderer.material = HawesDiffuse;
        weaponInHand = 2;
        if (PlayerPrefs.GetString("currentWeapon") == "")
        {
            weaponInHand = 0;
        }
        else if (PlayerPrefs.GetString("currentWeapon") == "machete")
        {
            weaponInHand = 1;
        }
        else if (PlayerPrefs.GetString("currentWeapon") == "shotgun")
        {
            weaponInHand = 2;
        }
        else if (PlayerPrefs.GetString("currentWeapon") == "semiauto")
        {
            weaponInHand = 3;
        }

        weaponInHand = 1;

        LoadWeapon();
    }
Exemplo n.º 3
0
 public void OuyaGetProductsOnFailure(int errorCode, string errorMessage)
 {
     Debug.LogError(string.Format("OuyaGetProductsOnFailure: error={0} errorMessage={1}", errorCode, errorMessage));
     gui = FindObjectOfType(typeof(GUI_HUD)) as GUI_HUD;
     if (gui != null)
     {
         gui.Error();
     }
 }
Exemplo n.º 4
0
    void Awake()
    {
        health = 100;
        mana = 25;
        hud = FindObjectOfType<GUI_HUD>();

        hud.partyMembers.Add(gameObject);
        //hud.s_charName = gameObject.name;
        //hud.s_hpValue = health;
        //hud.s_mpValue = mana;
    }
Exemplo n.º 5
0
    // Use this for initialization
    void Awake()
    {
        playerController = GetComponent <CharacterController>();
        inGameMenu       = GameObject.FindGameObjectWithTag("InGameMenu").GetComponent <InGameMenu>();
        gui            = GameObject.FindWithTag("GUI").GetComponent <GUI_HUD>();
        cam            = Camera.main;
        Cursor.visible = false;
        rotationSpeed  = PlayerPrefs.GetFloat("RotationSensitivity");

        EquipGun(PlayerPrefs.GetInt("playerLoadout"));
    }
Exemplo n.º 6
0
    public void OuyaMenuButtonUp()
    {
        Debug.Log(System.Reflection.MethodBase.GetCurrentMethod().ToString());
        Debug.Log("HERE I AM FINALLY WORKING");
        gui = FindObjectOfType(typeof(GUI_HUD)) as GUI_HUD;


        if (gui)
        {
            //gui.PauseMenu();
        }
    }
Exemplo n.º 7
0
 private void Awake()
 {
     instance = this;
 }
Exemplo n.º 8
0
 void Start()
 {
     gui    = FindObjectOfType(typeof(GUI_HUD)) as GUI_HUD;
     loader = GetComponent(typeof(loadingScript)) as loadingScript;
 }
Exemplo n.º 9
0
 void Start()
 {
     gui = FindObjectOfType(typeof(GUI_HUD)) as GUI_HUD;
 }