void Start() { gearType = "Carrousel"; ID = (uint)defaultID; motor = GetComponent<MogoSimpleMotor>(); if (motor == null) motor = gameObject.AddComponent<MogoSimpleMotor>(); AddListeners(); CheckSpin(); }
void Start() { gearType = "SlidingDoor"; originalPosition = transform.position; motor = gameObject.AddComponent <MogoSimpleMotor>(); ID = (uint)defaultID; triggleEnable = true; stateOne = true; goSpeed = goSpeed < 1 ? 1 : goSpeed; comeSpeed = comeSpeed < 1 ? 1 : comeSpeed; EventDispatcher.AddEventListener <MonoBehaviour>(Events.GearEvent.MotorHandleEnd, DoorMoveEnd); }
void Start() { gearType = "SlidingDoor"; originalPosition = transform.position; motor = gameObject.AddComponent<MogoSimpleMotor>(); ID = (uint)defaultID; triggleEnable = true; stateOne = true; goSpeed = goSpeed < 1 ? 1 : goSpeed; comeSpeed = comeSpeed < 1 ? 1 : comeSpeed; EventDispatcher.AddEventListener<MonoBehaviour>(Events.GearEvent.MotorHandleEnd, DoorMoveEnd); }
void Start() { gearType = "Carrousel"; ID = (uint)defaultID; motor = GetComponent <MogoSimpleMotor>(); if (motor == null) { motor = gameObject.AddComponent <MogoSimpleMotor>(); } AddListeners(); CheckSpin(); }
void Start() { gearType = "MobilePlatform"; triggleEnable = true; stateOne = true; sourcePosition = transform.position; lastPosition = transform.position; pathDiretion = true; currentPointIndex = 0; doors = transform.GetComponentsInChildren <MobilePlatformDoor>(); gear = transform.GetComponentInChildren <MobilePlatformGear>(); motor = gameObject.AddComponent <MogoSimpleMotor>(); }
void Start() { gearType = "MobilePlatform"; triggleEnable = true; stateOne = true; sourcePosition = transform.position; lastPosition = transform.position; pathDiretion = true; currentPointIndex = 0; doors = transform.GetComponentsInChildren<MobilePlatformDoor>(); gear = transform.GetComponentInChildren<MobilePlatformGear>(); motor = gameObject.AddComponent<MogoSimpleMotor>(); }
void Start() { gearType = "Patrol"; ID = (uint)defaultID; motor = GetComponent <MogoSimpleMotor>(); if (motor == null) { motor = gameObject.AddComponent <MogoSimpleMotor>(); } motor.SetSpeed(speed); currentPointIndex = 0; ResetAction(); AddListeners(); }