Inheritance: MonoBehaviour
Exemplo n.º 1
0
    // Update is called once per frame
    void Update()
    {
        startTimer = Mathf.MoveTowards(startTimer, endTimer, Time.deltaTime);
        float perc = Mathf.InverseLerp(0.0f, endTimer, startTimer);

        Vector3 pos = new Vector3();

        pos.x = Lerp(startPos.x, targetBracket.transform.position.x, xCurve.Evaluate(perc));
        pos.y = Lerp(startPos.y, targetBracket.transform.position.y, yCurve.Evaluate(perc));
        if (perc >= 1.0f)
        {
            pos.x = targetBracket.transform.position.x;
            pos.y = targetBracket.transform.position.y;
        }
        this.transform.position = pos;
        if (perc >= 1.0f)
        {
            Bracket b = targetBracket.GetComponent <Bracket>();
            if (b != null)
            {
                b.RegisterContestant(this.gameObject);
            }
            else
            {
                RotateOverTime rot = this.GetComponent <RotateOverTime>();
                if (rot != null)
                {
                    Destroy(rot);
                }
            }
        }
    }
    public void SeedMonotouchAheadOfTimeCompile()
    {
        ParticleSystem system = null;

        system.playbackSpeed++;
        system.startLifetime++;
        system.startSpeed++;
        system.startDelay++;
        system.startRotation++;
        system.emissionRate++;
        RenderToTexture texture = null;

        texture.m_ObjectToRender  = null;
        texture.m_RealtimeRender &= true;
        texture.enabled          &= true;
        FullScreenEffects effects = null;

        effects.BlendToColorAmount++;
        effects.VignettingEnable &= true;
        effects.VignettingIntensity++;
        MeshFilter filter = null;

        filter.mesh = null;
        RotateOverTime time = null;

        time.RotateSpeedX++;
        time.RotateSpeedY++;
        time.RotateSpeedZ++;
    }
Exemplo n.º 3
0
    public static RotateOverTime CreateComponent(GameObject where, Vector3 aroundAxis, float speed)
    {
        RotateOverTime component = where.AddComponent <RotateOverTime>();

        component.axis          = aroundAxis;
        component.rotationSpeed = speed;
        return(component);
    }
 void Start()
 {
     PhotonNetwork.NickName    = MasterManager.GameSettings.NickName;
     PhotonNetwork.GameVersion = MasterManager.GameSettings.GameVersion;
     if (icon != null)
     {
         RotateOverTime.CreateComponent(icon.gameObject, Vector3.forward, -45f);
     }
     MasterManager.GameStatus = GameStatusEnum.TryingToConnect;
     Connect();
 }
Exemplo n.º 5
0
 // Update is called once per frame
 void Update()
 {
     instance = this;
     if (Camera.main.transform.IsDay())
     {
         transform.Rotate(transform.right, rotateSpeed / 2 * 360 / 60 * Time.deltaTime);
     }
     else
     {
         transform.Rotate(transform.right, rotateSpeed * 360 / 60 * Time.deltaTime);
     }
 }
Exemplo n.º 6
0
 private void Start()
 {
     instance = this;
 }