void Start() { movementController = GetComponent <MovementController>(); movementController.OnCoordinateSpaceDelta += OnCoordinateSpaceDelta; movementController.OnNewCoordinateSpace += OnNewCoordinateSpace; var springObject = new GameObject("Axial"); springObject.transform.parent = transform; springObject.transform.localPosition = Vector3.zero; springObject.transform.localRotation = Quaternion.identity; var spring = springObject.AddComponent <AxialSpring>(); spring.axis = Vector3.up; spring.dynamicStrength = 0.00000001f; var gyroObject = new GameObject("Gyro"); gyroObject.transform.parent = springObject.transform; gyroObject.transform.localPosition = Vector3.zero; gyroObject.transform.localRotation = Quaternion.identity; var gyro = gyroObject.AddComponent <GyroSpring>(); gyro.staticStrength = 10f; var camera = GetComponentInChildren <Camera>(); camera.transform.parent = gyroObject.transform; camera.transform.localPosition = Vector3.zero; camera.transform.localRotation = Quaternion.identity; root = SpringComponent.AutoLink(springObject); CEventSystem.AddEventListener(EventChannel.input, EventPlayerNumberChannel.player1, this); }
void Start() { CEventSystem.AddEventListener(ServerEventChannel.channel, ServerEventChannel.subchannel, this); }
public void Start() { CEventSystem.AddEventListener(Channel.channel, Channel.subchannel, this); }
public void Start() { CEventSystem.AddEventListener(ShipChannel.channel, ShipChannel.subchannel, this); var plat = gameObject.AddComponent <Platform>(); }
void Awake() { statusLabel = gameObject.transform.Find("Status").GetComponentInChildren <UnityEngine.UI.Text>(); CEventSystem.AddEventListener(ServerEventChannel.channel, ServerEventChannel.subchannel, this); }
private void Awake() { movementController = GetComponent <MovementController>(); CEventSystem.AddEventListener(EventChannel.input, playerNumber, movementController); }
protected override void _Start() { CEventSystem.AddEventListener(ShipChannel.shipChannel, ShipChannel.shipSubchannel, this); platform = gameObject.AddComponent <Platform>(); }