Example #1
0
    public PlanetView GetPlanetView(TilemapCircle tilemapCircle)
    {
        if (tilemapCircle is Planet)
        {
            return(GetPlanetView(((Planet)tilemapCircle).ThingIndex));
        }

        return(null);
    }
Example #2
0
    public bool ExistsPlanetView(TilemapCircle tilemapCircle)
    {
        if (tilemapCircle is Planet)
        {
            return(planetViews[((Planet)tilemapCircle).ThingIndex] != null);
        }

        return(false);
    }
    public void Init(TilemapCircleView tilemapCircleView)
    {
        this.tilemapCircleView = tilemapCircleView;
        this.tilemapCircle     = tilemapCircleView.TilemapCircle;
        this.circleNormals     = tilemapCircle.CircleNormals;
        this.circleHeights     = tilemapCircle.CircleHeights;

        meshRenderer.sharedMaterial = this.tilemapCircleView.backgroundMaterial;

        InitMesh();
    }
Example #4
0
    public void Init(TilemapCircle tilemapCircle)
    {
        this.tilemapCircle = tilemapCircle;

        tilemapCircle.Listener = this;

        UpdatePosition();

        InitRenderers();

        UpdateMesh();
    }
    public void Init(TilemapCircleView tilemapCircleView, int fromX, int toX)
    {
        dirty     = true;
        firstTime = true;

        this.tilemapCircleView = tilemapCircleView;
        this.tilemapCircle     = tilemapCircleView.TilemapCircle;
        this.fromX             = fromX;
        this.toX           = toX;
        this.circleNormals = tilemapCircle.CircleNormals;
        this.circleHeights = tilemapCircle.CircleHeights;

        meshRenderer.sharedMaterial = tilemapCircleView.material;
    }
Example #6
0
    public virtual void OnParentChanged(TilemapCircle parent)
    {
        parentView = universeView.GetPlanetView(universeObject.parent);

        UpdatePosition();
    }
Example #7
0
    public virtual void Recycle()
    {
        tilemapCircle = null;

        gameObject.SetActive(false);
    }