示例#1
0
 public void Start()
 {
     GM  = GetComponentInParent <GridManager>();
     EPM = GameObject.Find("Empire Manager").GetComponent <EmpireManager>();
     MM  = GameObject.Find("Empire Manager").GetComponent <MillitaryManager>();
     CC  = GameObject.Find("Main Camera").GetComponent <CameraController>();
 }
示例#2
0
            public PlayerListItem(BasicPlayer player, EmpireManager empireManager)
            {
                // format the text with the players name, selected empire and an icon indicating the game host
                Player = player;
                Color empireColor = Color.White;

                if (empireManager != null)
                {
                    EmpireName  = Player.EmpireID;
                    empireColor = empireManager.GetEmpire(Player.EmpireID).PrimaryColor;
                }
                else
                {
                    EmpireName = "FACTORY=NULL";
                }

                if (player.InstanceID == 0)
                {
                    Text = $"$(capital) {Player.Name} - <[{empireColor.ToRichFormat()}]{Empire.FormatName(EmpireName)}>".ToRichText();
                }
                else
                {
                    Text = $"{Player.Name} - <[{empireColor.ToRichFormat()}]{Empire.FormatName(EmpireName)}>".ToRichText();
                }
            }
示例#3
0
    void Awake()
    {
        //Make a Singleton
        if (instance == null)
        {
            instance = this;
        }
        else if (instance != this)
        {
            Destroy(this);
        }

        DontDestroyOnLoad(gameObject);
    }
示例#4
0
    // Use this for initialization
    void Start()
    {
        Tilemap          = GetComponent <Tilemap>();
        GalaxyGenerator  = GetComponent <GalaxyGenerator>();
        Spritemanager    = GetComponent <Spritemanager>();
        PrefabManager    = GetComponent <PrefabManager>();
        TimeController   = GetComponent <TimeController>();
        EntityManager    = GetComponent <EntityManager>();
        EmpireManager    = GetComponent <EmpireManager>();
        MenuManager      = GetComponent <MenuManager>();
        Flag.EmptyPrefab = new GameObject();



        MenuManager.LoadMainMenu();
    }
示例#5
0
 private void Start()
 {
     gc_createMountain();
     epm = GameObject.Find("Empire Manager").GetComponent <EmpireManager>();
 }