コード例 #1
0
ファイル: GameManager.cs プロジェクト: hamandswissgames/LD40
    void Awake()
    {
        if (instance == null)
        {
            instance = this;
        }
        else if (instance != this)
        {
            Destroy(gameObject);
        }
        DontDestroyOnLoad(gameObject);
        levelManager = GetComponent <LevelManager> ();
        boardManager = GetComponent <BoardManager> ();
        clickManager = GetComponent <ClickManager> ();

        gopherManager        = GetComponent <GopherManager> ();
        catManager           = GetComponent <CatManager> ();
        dogManager           = GetComponent <DogManager> ();
        dogCatcherManager    = GetComponent <DogCatcherManager> ();
        policeManager        = GetComponent <PoliceManager> ();
        bloodHoundManager    = GetComponent <BloodhoundManager> ();
        militaryManager      = GetComponent <MilitaryManager> ();
        enemyMilitaryManager = GetComponent <EnemyMilitaryManager> ();
        audioManager         = GetComponent <AudioSource> ();

        managers.Add(gopherManager);
        managers.Add(catManager);
        managers.Add(dogManager);
        managers.Add(dogCatcherManager);
        managers.Add(policeManager);
        managers.Add(bloodHoundManager);
        managers.Add(militaryManager);
        managers.Add(enemyMilitaryManager);
        Screen.SetResolution(800, 800, false);
    }
コード例 #2
0
 public void SaveDecks(MilitaryManager GameMilitaryManager)
 {
     //PlayerDecks.ForEach(MilitaryDecks => {
     //    GameMilitaryManager.PlayerMilitaryList.Add(new Tuple<List<DeckDataItem>,Vector2>(MilitaryDecks, MilitaryDecks.DeckCurrentWorldLocation));
     //    if (MilitaryDecks.)
     //});
 }
コード例 #3
0
 private void Awake()
 {
     if (Instance != null && Instance != this)
     {
         Destroy(gameObject);
     }
     else
     {
         Instance = this;
     }
 }
コード例 #4
0
ファイル: GameManager.cs プロジェクト: jl2l/DaysOfValorAlpha
 // Use this for initialization
 void Start()
 {
     GameWorldManager         = FindObjectOfType <WorldManager>();
     GameMapManager           = FindObjectOfType <MapManager>();
     GamePlayerCountryManager = GameMapManager.GamePlayerCountryManager;
     GameBattleManager        = FindObjectOfType <BattleManager>();
     GameCharacterManager     = FindObjectOfType <CharacterManager>();
     GameDeckManager          = FindObjectOfType <DeckManager>();
     GameIntelManager         = FindObjectOfType <IntelManager>();
     GameMilitaryManager      = FindObjectOfType <MilitaryManager>();
     GameResearchManager      = FindObjectOfType <ResearchManager>();
     GameTradeManager         = FindObjectOfType <TradeManager>();
     GameUnitManager          = FindObjectOfType <UnitManager>();
     //DontDestroyOnLoad(transform.gameObject);
 }
コード例 #5
0
ファイル: WorldManager.cs プロジェクト: jl2l/DaysOfValorAlpha
    // Use this for initialization
    void Start()
    {
        wmslObj = WMSK.instance;
        if (WorldGovernments.Count == 0)
        {
            countryFactory   = new CountryRelationsFactory();
            WorldGovernments = countryFactory.CreateOldWorldOrder();
            //World governments needs to get injected into WorldCountryManagent
        }
        StartCoroutine(IntializeWorld(WorldGovernments));


        GameMapManager      = FindObjectOfType <MapManager>();
        GameMilitaryManager = FindObjectOfType <MilitaryManager>();
        StartCoroutine(GameMilitaryManager.SetNavalGroups(GameMapManager.GamePlayerCountryManager));


        //WMSK.instance.SetCountriesAttributes(jsonCountries);
    }
コード例 #6
0
ファイル: Player.cs プロジェクト: adrienbusin/7WondersDuel
    private void Start()
    {
        RessourcesSecondaireCard = new List <GameObject>();
        RessourcesPrimairesCard  = new List <GameObject>();

        InitializeArgent();
        InitializeImage();

        PlayerManager = GameObject.FindGameObjectWithTag("PlayerManager").GetComponent <PlayerManager>();

        PlayerAdverse = PlayerNumber == 0
            ? PlayerManager.GetComponent <PlayerManager>().Player2.GetComponent <Player>()
            : PlayerManager.GetComponent <PlayerManager>().Player1.GetComponent <Player>();

        _scienceManager = GameObject.Find("ScienceManager").GetComponent <ScienceManager>();
        pieceMilitaire  = GameObject.Find("MilitaryManager").GetComponent <MilitaryManager>();

        _playerNameTxt.GetComponent <Text>().text = PlayerName;
    }