예제 #1
0
    void Start()
    {
        gearType = "Carrousel";
        ID = (uint)defaultID;

        motor = GetComponent<MogoSimpleMotor>();
        if (motor == null)
            motor = gameObject.AddComponent<MogoSimpleMotor>();

        AddListeners();

        CheckSpin();
    }
예제 #2
0
    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);
    }
예제 #3
0
	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);
	}
예제 #4
0
    void Start()
    {
        gearType = "Carrousel";
        ID       = (uint)defaultID;

        motor = GetComponent <MogoSimpleMotor>();
        if (motor == null)
        {
            motor = gameObject.AddComponent <MogoSimpleMotor>();
        }

        AddListeners();

        CheckSpin();
    }
예제 #5
0
    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>();
    }
예제 #6
0
    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>();
    }
예제 #7
0
    void Start()
    {
        gearType = "Patrol";
        ID       = (uint)defaultID;

        motor = GetComponent <MogoSimpleMotor>();
        if (motor == null)
        {
            motor = gameObject.AddComponent <MogoSimpleMotor>();
        }

        motor.SetSpeed(speed);

        currentPointIndex = 0;
        ResetAction();

        AddListeners();
    }