Exemplo n.º 1
0
    void Awake()
    {
        game_time = 0.0f;
        menu_time = 0.0f;

        GameObject player_prefab = GameObject.Find("player_prefab");
        player = player_prefab.GetComponent<player_class>();
    }
Exemplo n.º 2
0
    // Use this for initialization
    void Start()
    {
        GameObject temp = GameObject.Find("player_prefab");
        thePlayer = temp.GetComponent<player_class>();
        combos = temp.GetComponent<combo_master>();

        GameObject temp2 = GameObject.Find("GUI - Bar");
        tolerance = temp2.GetComponent<GUIScript>();

        GameObject temp3 = GameObject.Find("Director");
        theDirector = temp3.GetComponent<Director>();
    }
Exemplo n.º 3
0
 // Use this for initialization
 void Start()
 {
     GameObject temp = GameObject.Find("player_prefab");
     thePlayer = temp.GetComponent<player_class>();
 }
Exemplo n.º 4
0
    // Use this for initialization
    void Start()
    {
        Application.targetFrameRate = 60;
        this.tolerance_increase_ratio = ((this.barBackgroundTexture.height + 16) * 1.0f) / (this.barBackgroundTexture.height * 1.0f);

        this.barWidth = Screen.width;
        this.barHeight = Screen.height * this.height_ratio;

        this.barBackgroundRect.height = this.barHeight;
        this.barBackgroundRect.width = this.barWidth;
        this.barBackgroundRect.y = Screen.height - (Screen.height * this.height_ratio)
                                                 - from_bottom_gap;

        this.toleranceBarRect.height = this.barHeight * this.tolerance_increase_ratio;
        this.toleranceBarRect.width = this.toleranceBarTexture.width * this.tolerance_increase_ratio;
        this.toleranceBarRect.y = this.barBackgroundRect.y - ((this.toleranceBarRect.height - this.barBackgroundRect.height)/2);
        this.toleranceBarRect.x = Screen.width * (this.value / 100);

        this.barRect.height = this.barHeight * this.inside_bar_ratio;
        this.barRect.y = Screen.height - (Screen.height * this.height_ratio)
                                       - from_bottom_gap
                                       + (inside_bar_y_push * this.barHeight);

        float ratio = this.barHeight / capTexture.height;
        this.capRect.width = capTexture.width * ratio;
        this.capRect.height = capTexture.height * ratio * this.inside_bar_ratio;
        this.capRect.y = Screen.height - (Screen.height * this.height_ratio)
                                       - from_bottom_gap
                                       + (inside_bar_y_push * this.barHeight);

        this.glimmerRect.width = barWidth;
        this.glimmerRect.height = barHeight * 1.2f;
        this.glimmerRect.y =  Screen.height - (Screen.height * this.height_ratio)
                                            - from_bottom_gap
                                            - (barHeight * 0.1f);
        GameObject temp_Thing = GameObject.Find("player_prefab");
        thePlayer = temp_Thing.GetComponent<player_class>();
    }