Exemple #1
0
        // Set up world divider
        public WorldDivisionSquaresDivisibleByWorldSize()
        {
            Vector2Int _terrainDimension = new Vector2Int(4000, 4000);

            cellDimension = new Vector2Int(1000, 1000);

            var gameObject = new GameObject();

            worldDivider = gameObject.AddComponent <WorldDivision>();

            worldDivider.Construct(_terrainDimension, cellDimension);
        }
Exemple #2
0
        // Set up world divider
        public WorldDivisionRectangles_NotDivisibleByWorldSize()
        {
            Vector2Int _terrainDimension = new Vector2Int(4100, 6025);

            cellDimension = new Vector2Int(2000, 3000);

            var gameObject = new GameObject();

            worldDivider = gameObject.AddComponent <WorldDivision>();

            worldDivider.Construct(_terrainDimension, cellDimension);
            cells = worldDivider.Cells;
        }
    // Singleton
    private void Awake()
    {
        IsZoneMapCreated = false;

        if (instance != null)
        {
            Destroy(gameObject);
        }
        else
        {
            instance = this;
        }
    }
Exemple #4
0
 private void Awake()
 {
     zoneManager    = FindObjectOfType <WorldDivision>();
     networkCulling = transform.parent.GetComponentInChildren <NetworkCulling>();
 }
 private void Awake()
 {
     zoneManager = FindObjectOfType <WorldDivision>();
     pView       = playerTransform.GetComponent <PhotonView>();
 }