//----------------------------------------------------------------------
 //! @brief Startメソッド
 //!
 //! @param[in] なし
 //!
 //! @return なし
 //----------------------------------------------------------------------
 // Use this for initialization
 void Start()
 {
     GameManagerScript = GameObject.Find("GameManager").GetComponent <GameManager>();
     time             = 0;
     isVirusControll  = false;
     virusAmount      = maxVirusAmount;
     isSetGame        = GameManagerScript.GetStartPandemic();
     playerController = GetComponent <PlayerController>();
     comboScript      = GameObject.Find("ComboManager").GetComponent <ComboScript>();
 }
 void Start()
 {
     m_ComboScript = m_ComboText.GetComponent <ComboScript>();
     //I will remove items from the music list (list that helps instantiate music notes, so I want to create for this script a new unique list
     m_MusicList = new List <float>();
     //copy all the values from the musicmanager list to this list
     m_MusicList.AddRange(m_MusicManager.GetList());
     //Later on, everytime we check the timing of our input against the music list, remove the timing from our list here.
     UpdateScoreText();
 }
Beispiel #3
0
    void Start()
    {
        // Load GameObjects
        orbit 		=	GameObject.Find("CenterObject");
        controll 	=	GameObject.Find("GameControl");
        spawner 	=	GameObject.FindGameObjectWithTag("Spawner");

        // Load Scripts
        lifeP 		= 	orbit.gameObject.GetComponent<LifeScript>();
        wave		= 	spawner.gameObject.GetComponent<WaveSysteem>();
        score 		= 	controll.gameObject.GetComponent<Score>();
        combo 		= 	controll.gameObject.GetComponent<ComboScript> ();
    }
Beispiel #4
0
    // Use this for initialization
    void Awake()
    {
        audio         = GetComponent <AudioSource>();
        state         = new UnVirusState(this);
        nextState     = null;
        originalVirus = null;
        virusFlag     = false;
        // モデルからMeshRendererコンポーネントを探す
        m_modelMesh = gameObject.GetComponentInChildren <SkinnedMeshRenderer>();
        // 色を取得
        //int size = m_modelMesh.materials.Length;
        //m_defaultColor = new Color[size];
        //for (int i = 0; i < size; i++)
        //    m_defaultColor[i] = m_modelMesh.materials[i].color;

        comboManager = GameObject.Find("ComboManager");
        combo        = comboManager.GetComponent <ComboScript>();
    }
    // Use this for initialization
    void Start()
    {
        timer     = 0;
        gameState = 0;
        player1.transform.position = new Vector3(-3, -4.2f, gameObject.transform.position.z);
        player2.transform.position = new Vector3(3, -1.5f, gameObject.transform.position.z);
        textScript   = GameObject.Find("TextFactory").GetComponent <TextGenerator>();
        sceneManager = GameObject.Find("SceneManager").GetComponent <SceneManagement>();

        HP1 = player1.GetComponent <HPDirectorScript>();
        HP2 = player2.GetComponent <HPDirectorScript>();

        initPos1 = player1.transform.position;
        initPos2 = player2.transform.position;

        comboScript = GetComponent <ComboScript>();
        gameScript  = GetComponent <GetGameScript>();
    }