Exemplo n.º 1
0
    void Start()
    {
        sound_manager = GameObject.FindGameObjectWithTag("Sound_Manager").GetComponent<Sound_Manager>().GetInstance();
        if (sound_manager.GetInstance() != null)
        {
        snapshot_normal = sound_manager.GetInstance().master_mixer.FindSnapshot("Snapshot");
        snapshot_attack = sound_manager.GetInstance().master_mixer.FindSnapshot("Snapshot_Attack");

        }
    }
Exemplo n.º 2
0
    public void Start_CardSelect()
    {
        Global._gameMode = GAME_MODE.CARD_SELECT;

        Sound_Manager.GetInstance().Stop_Sound();
        if (Random.Range(0, 2) == 0)
        {
            Sound_Manager.GetInstance().PlaySound("Hearthstone");
        }
        else
        {
            Sound_Manager.GetInstance().PlaySound("Hearthstone2");
        }

        DestroyAll();

        cardSelect.Start_CardSelect();
    }
Exemplo n.º 3
0
    void Start()
    {
        m_baseCell.isMine = false;
        m_baseCell.isAIPossessed = true;
        m_baseCell.isDepleting = false;
        m_baseCell.currentProtein *= 0.5f;  // lower enemy power
        m_baseCell.tag = "EnemyCell";
        m_baseCell.gameObject.layer = LayerMask.NameToLayer("EnemyCell");
        m_baseCell.SetSpeed(m_baseCell.navAgent.speed * .5f);
        m_baseCell.currentState = CellState.IDLE;
        if (GetComponent<FogOfWarHider>() == null) gameObject.AddComponent<FogOfWarHider>();
        if (GetComponent<FogOfWarViewer>() != null) Destroy(GetComponent<FogOfWarViewer>());
        GameObject.Find("PlayerControl").GetComponent<PlayerController>().RemoveDeadCell(m_baseCell);
        GameObject.Find("PlayerControl").GetComponent<PlayerController>().AddNewCell(m_baseCell);
        sound_manager = GameObject.FindGameObjectWithTag("Sound_Manager").GetComponent<Sound_Manager>().GetInstance();
        sound_manager.GetInstance().master_mixer.FindSnapshot("Snapshot_Attack").TransitionTo(3.0f);
        if (!sound_manager.GetInstance().battle_music.isPlaying)
        {
        sound_manager.GetInstance().battle_music.Play();

        }
    }
Exemplo n.º 4
0
    void Awake()
    {
        Sound_Manager.GetInstance().Initialize();

        Start_CardSelect();
    }