//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(); }
private void EnsureInit() { if (registerTile == null) { registerTile = GetComponent <RegisterTile>(); } registerTile.SetPipeData(pipeData); Vector2 searchVec = this.registerTile.LocalPosition.To2Int(); pipeData.MonoPipe = this; pipeData.OnEnable(); }
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); }
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); }