示例#1
0
        //Stuff for pipes to go in here

        public void Initialise(PipeTile DataToTake, MetaDataNode metaDataNode, Vector3Int searchVec, Matrix locatedon, int RotationOffset)
        {
            RelatedTile = DataToTake;
            IsOn        = metaDataNode;
            pipeData    = new PipeData();
            pipeData.SetUp(DataToTake, RotationOffset);
            pipeData.pipeNode = this;
            NodeLocation      = searchVec;
            LocatedOn         = locatedon;
            pipeData.OnEnable();
        }
示例#2
0
        private void EnsureInit()
        {
            if (registerTile == null)
            {
                registerTile = GetComponent <RegisterTile>();
            }

            registerTile.SetPipeData(pipeData);
            Vector2 searchVec = this.registerTile.LocalPosition.To2Int();

            pipeData.MonoPipe = this;
            pipeData.OnEnable();
        }
示例#3
0
        public virtual void OnSpawnServer(SpawnInfo info)
        {
            if (pipeData.PipeAction == null)
            {
                pipeData.PipeAction = new MonoActions();
            }
            registerTile.SetPipeData(pipeData);
            pipeData.MonoPipe = this;
            int Offset = PipeFunctions.GetOffsetAngle(transform.localRotation.eulerAngles.z);

            pipeData.Connections.Rotate(Offset);
            pipeData.OnEnable();
            spritehandler?.SetColor(Colour);
        }
示例#4
0
        private void EnsureInit()
        {
            if (registerTile == null)
            {
                registerTile = GetComponent <RegisterTile>();
            }

            registerTile.SetPipeData(pipeData);
            pipeData.MonoPipe = this;
            int Offset = PipeFunctions.GetOffsetAngle(this.transform.localRotation.eulerAngles.z);

            pipeData.Connections.Rotate(Offset);
            pipeData.OnEnable();
            spritehandler?.SetColor(Colour);
        }