public Cue(int tick, int tickLength, int pitch, int velocity, GridOffset gridOffset, float zOffset, HandType handType, Behavior behavior) { this.tick = tick; this.tickLength = tickLength; this.pitch = pitch; this.velocity = velocity; this.gridOffset = gridOffset; this.zOffset = zOffset; this.handType = handType; this.behavior = behavior; }
private void UpdateGridOffset() { if (gridChanged) { grid = Block.CubeGrid; grid.OnBlockRemoved += OnBlockRemoved; grid.PositionComp.OnPositionChanged += OnPositionChanged; var currentWorldPos = Vector3D.Transform(LocalPosition, GetBlockWorldMatrix()); GridOffset = Vector3D.Transform(currentWorldPos, grid.WorldMatrixNormalizedInv); MyAPIGateway.Utilities.ShowMessage("", GridOffset.ToString()); gridChanged = false; } }