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

            var plat = gameObject.AddComponent <Platform>();
        }
Exemplo n.º 5
0
    void Awake()
    {
        statusLabel = gameObject.transform.Find("Status").GetComponentInChildren <UnityEngine.UI.Text>();

        CEventSystem.AddEventListener(ServerEventChannel.channel, ServerEventChannel.subchannel, this);
    }
Exemplo n.º 6
0
 private void Awake()
 {
     movementController = GetComponent <MovementController>();
     CEventSystem.AddEventListener(EventChannel.input, playerNumber, movementController);
 }
Exemplo n.º 7
0
        protected override void _Start()
        {
            CEventSystem.AddEventListener(ShipChannel.shipChannel, ShipChannel.shipSubchannel, this);

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