Ejemplo n.º 1
0
    // Use this for initialization
    void Start()
    {
        animationTest = this.GetComponent<SkeletonAnimation>();

        m_transform = this.transform;

        gameOverObj = GameObject.Find("GameOver");
        gameOverScript = gameOverObj.GetComponent<GameOver>();

        furyBarObj = GameObject.Find("FuryBar");
        furyBarScript = furyBarObj.GetComponent<FuryBarManager>();

        enemyManagerObj = GameObject.Find("EnemyCreator");
        enemyManagerScript = enemyManagerObj.GetComponent<EnemyManager>();

        //mainScreenObj = GameObject.Find("MainCamera");
        shakeScreenScript = mainScreenObj.GetComponent<ShakeScreen>();

        attackAudioObj = GameObject.Find("AttackAudios");
        attackAudioScript = attackAudioObj.GetComponent<attackAudio>();

        AudioObj = GameObject.Find("Audios");
        m_audioManager = AudioObj.GetComponent<AudioManager>();

        scoreManagerObj = GameObject.Find("Kill");
        m_scoreManager = scoreManagerObj.GetComponent<ScoreManager>();

        minPosX = Screen.width / 16f * 6.5f;
        maxPosX = Screen.width / 16f * 9f;
        minPosY = Screen.height / 16f * 6.5f;
        maxPosY = Screen.height / 16f * 9f;

        animationTest.state.Event += Event;
        animationTest.state.End += state_End;

        //animationTest.state.End += (state, trackIndex) =>
        //{
        //    Debug.Log("start: " + state.GetCurrent(trackIndex));
        //};
        //animationTest.state.End += ActionChange;
    }
Ejemplo n.º 2
0
    // Use this for initialization
    void Start()
    {
        furyBarObj = GameObject.Find("FuryBar");
        furyBarScript = furyBarObj.GetComponent<FuryBarManager>();
        myPlayerObj = GameObject.Find("MyPlayer");
        m_playerPrefs = myPlayerObj.GetComponent<M_PlayerPrefs>();

        enemyCreatorObj = GameObject.Find("EnemyCreator");
        enemyManagerScript = enemyCreatorObj.GetComponent<EnemyManager>();

        m_scoreText = this.GetComponent<Text>();
        m_color = m_scoreText.color;
        m_color.a = 0;
        m_scoreText.color = m_color;
        m_Text_E.GetComponent<Text>().color = m_color;
        m_color_C = m_Text_C.GetComponent<Image>().color;
        m_color_C.a = m_color.a;
        m_Text_C.GetComponent<Image>().color = m_color_C;

        m_pos = this.transform.position;
        m_size = new Vector2(1600, 300);

        m_transform = this.transform;
        origScale = m_transform.localScale*1.00000f;
        m_Scale = origScale;
        m_camera = Camera.main.GetComponent<Camera>();
        origCameraSize = m_camera.orthographicSize;
        lastCameraSize = origCameraSize;

        m_goldCountText = GameObject.Find("Gold").GetComponent<GoldCount>();
    }