Пример #1
0
    // Update is called once per frame
    void Update()
    {
        float WorldTimeSpeed = worldtime.GetTime();

        transform.Translate(MoveForceX * WorldTimeSpeed, MoveForceY * WorldTimeSpeed, 0.0f, Space.World);
        transform.Rotate(0, 0, RotationForce * WorldTimeSpeed);
    }
Пример #2
0
    // Update is called once per frame
    void Update()
    {
        float Speed = worldtime.GetTime();

        transform.Translate(MoveForce * Speed, 0, 0);
        if (transform.position.x >= MaxMoveDistance)
        {
            transform.position = DefaltPos;
        }
    }
Пример #3
0
    // Update is called once per frame
    void Update()
    {
        float WorldTimeSpeed = worldtime.GetTime();

        InstanceHormingTime -= Time.deltaTime * WorldTimeSpeed;
        if (InstanceHormingTime <= 0)
        {
            InstanceHormingTime = CopyTime;
            Instantiate(HormingObj, transform.position, HormingObj.transform.rotation);
        }
    }
Пример #4
0
    // Update is called once per frame
    void Update()
    {
        float WorldTimeSpeed = worldtime.GetTime();

        if (HormingTime <= MaxHormingTime)
        {
            vec          = (TargetObj.transform.position - transform.position).normalized;
            HormingTime += Time.deltaTime;
        }
        transform.rotation  = Quaternion.FromToRotation(Vector3.right, vec);
        transform.position += vec * MoveSpeed * WorldTimeSpeed;
    }
Пример #5
0
    // Update is called once per frame
    void Update()
    {
        float WorldTime = worldtime.GetTime();

        transform.Translate(MoveForce * WorldTime, 0, 0);
    }