Exemple #1
0
 void OnEnable()
 {
     gui = GameObject.FindGameObjectWithTag("GUI").GetComponent <GUI_HUD>();
     playerController = GetComponent <PlayerController>();
     health           = maxHealth;
     LevelUp();
 }
Exemple #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();
    }
 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();
     }
 }
    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;
    }
Exemple #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"));
    }
    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();
        }
    }
Exemple #7
0
 private void Awake()
 {
     instance = this;
 }
 void Start()
 {
     gui    = FindObjectOfType(typeof(GUI_HUD)) as GUI_HUD;
     loader = GetComponent(typeof(loadingScript)) as loadingScript;
 }
 void Start()
 {
     gui = FindObjectOfType(typeof(GUI_HUD)) as GUI_HUD;
 }