public void Start() { if (!Driver) { Driver = GetComponentInParent <GridDriver>(); } Rigidbody = GetComponentInParent <Rigidbody>(); }
public static bool GetCellInfo(int rowHandle, GridColumn col, ref IExplorerObject explorerObject, ref PropertyDefinition propDef) { if (ExplorerApp.Application.ExplorerForm.ExplorerViewPanel.ExplorerControl is ItemMasterControl itemMasterControl) { var mcBinder = new InternalBinder(itemMasterControl); var prop = mcBinder.GetField("m_itemsGridOptions"); GridDriver gd = prop as GridDriver; return(gd.GetCellInfo(rowHandle, col, ref explorerObject, ref propDef)); } return(false); }
public void Start() { Effect = GetComponentInChildren <VisualEffect>(); mMenu_thrusting = new TerminalMenu("Enabled", new ButtonTerminal(ForceThrust)); var driver = GetComponentInParent <GridDriver>(); if (driver) { Driver = driver; } }
protected override void VerifyLocation(GridLocation oldLocation, GridLocation newLocation) { if (oldLocation.Grid == newLocation.Grid) { return; } BlockGrid grid = newLocation.Grid; GridDriver driver = grid.GetComponent <GridDriver>(); if (!driver) { driver = grid.gameObject.AddComponent <GridDriver>(); driver.Grid = grid; } Driver = driver; }
public void FixedUpdate() { Player player = Player; GridDriver driver = Driver; if (player) { Inputs inputs = player.Inputs; if (inputs.scndary) { OnExit(); } else { Quaternion chair = LocalChairRotation; driver.Move = Quaternion.Inverse(chair) * inputs.move; driver.Look = Quaternion.Inverse(chair) * inputs.look; SetPlayerPosRot(player); } } }