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);
        }
示例#2
0
 void Start()
 {
     CEventSystem.AddEventListener(ServerEventChannel.channel, ServerEventChannel.subchannel, this);
 }
示例#3
0
 public void Start()
 {
     CEventSystem.AddEventListener(Channel.channel, Channel.subchannel, this);
 }
示例#4
0
        public void Start()
        {
            CEventSystem.AddEventListener(ShipChannel.channel, ShipChannel.subchannel, this);

            var plat = gameObject.AddComponent <Platform>();
        }
示例#5
0
    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);
 }
示例#7
0
        protected override void _Start()
        {
            CEventSystem.AddEventListener(ShipChannel.shipChannel, ShipChannel.shipSubchannel, this);

            platform = gameObject.AddComponent <Platform>();
        }