// Use this for initialization new void Start() { SpriteRenderer r = this.GetComponent <SpriteRenderer> (); if (r != null) { theMaterial = r.material; initialColor = theMaterial.color; } else { theTextMesh = this.GetComponent <TextMesh> (); if (theTextMesh != null) { initialColor = theTextMesh.GetComponent <MeshRenderer>().material.GetColor("_Color"); } } opacity = new SoftFloat(); opacity.setSpeed(1.0f); opacity.setTransformation(TweenTransforms.linear); if (startOpaque) { opacity.setValueImmediate(1.0f); } else { opacity.setValueImmediate(0.0f); } }
// Use this for initialization void Start() { if (started) { return; } initialLocalPos = this.transform.localPosition; started = true; pos = new SoftFloat(initialPos); reset(); }
// Use this for initialization public void Start() { if (started) { return; } started = true; xPosition = new SoftFloat(); xPosition.setSpeed(speed); xPosition.setEasyType(EaseType.tanh); xPosition.setValueImmediate(0.0f); initialPos = this.transform.position; }
// Use this for initialization void Start() { if (level_N == null) { level_N = GameObject.Find("LevelController").GetComponent <LevelControllerScript> (); } angle = new SoftFloat(); angle.setSpeed(3.0f); angle.setTransformation(TweenTransforms.tanh); currentAngle = level_N.retrieveFloatValue(StorageVariable); angle.setValueImmediate(openAngle - currentAngle); this.transform.rotation = Quaternion.Euler(-angle.getValue(), 0, 0); }
/* methods */ // Use this for initialization new void Start() { img = this.GetComponent <RawImage> (); Y = minY; yPos = new SoftFloat(Y); yPos.setSpeed(30.3f); yPos.setTransformation(TweenTransforms.tanh); originalPos = img.transform.localPosition; img.transform.localPosition = originalPos + new Vector3(0, Y, 0); state = 0; theText.color = new Color(1, 1, 1, 0); //otherText.color = new Color (0, 0, 0, 0); state = 1; }
void Awake() { GameObject lgo = GameObject.Find("LevelController"); if (lgo != null) { level = lgo.GetComponent <LevelControllerScript> (); } player_A = GameObject.Find("Player"); //warpToOriginalPosition (); softY = new SoftFloat(); softY.setTransformation(TweenTransforms.cubicOut); softX = new SoftFloat(); softX.setTransformation(TweenTransforms.cubicOut); softZ = new SoftFloat(); softZ.setTransformation(TweenTransforms.cubicOut); if (player_A != null) { if (player_A.GetComponent <PlayerScript> ().targetLookAt != null) { target = player_A.GetComponent <PlayerScript> ().targetLookAt; } } // setTargetX (25, 0.1f); // setTargetY (0, 0.1f); // setDistanceZ (10, 0.1f); lgo = GameObject.Find("PhysicalCameraFollow"); if (lgo != null) { cameraTremor = lgo.GetComponentInChildren <CameraUtils> (); cameraFollowAux = lgo.GetComponent <CameraFollowAux> (); } iTween.Init(this.gameObject); /*if(SceneManager.GetActiveScene().name.ToLower().Contains("interior")) * { * setDistanceZ(8.0f); * } * * if (SceneManager.GetActiveScene().name.ToLower().Contains("exterior")) * { * setDistanceZ(10.0f); * }*/ }
// Use this for initialization void Start() { angle = new SoftFloat(initialAngle); angle.setSpeed(30.0f); angle.setTransformation(TweenTransforms.cubicOut); lvl = FindObjectOfType <LevelControllerScript>(); if (reentrant) { if (lvl.retrieveBoolValue(this.name + "Rotated")) { rotateImmediately(); } else { unrotateImmediately(); } } }
// Use this for initialization void Start() { y = new SoftFloat(initialY); y.setSpeed(10.0f); y.setTransformation(TweenTransforms.cubicOut); Vector3 pos = this.transform.position; pos.y = initialY; this.transform.position = pos; if (levelController == null) { levelController = GameObject.Find("LevelController").GetComponent <LevelControllerScript> (); } if (levelController.retrieveBoolValue(StorageVariable)) { y.setValueImmediate(finalY); Vector3 temp = this.transform.position; temp.y = y.getValue(); this.transform.position = temp; } }
// Use this for initialization void Start() { basePos = this.transform.position; mc = GameObject.Find("MasterController").GetComponent <MasterControllerScript> (); ds = mc.getStorage(); pos = new SoftFloat(0.0f); pos.setSpeed(2.0f); if (autoreentrant) { int bs = ds.retrieveIntValue(this.name + "BridgeStep"); step = bs; setStepImmediate(bs); if (step == numberOfSteps) { if (barrier_N != null) { barrier_N.SetActive(false); } } } }
public void Initialize() { textMeshGO = new GameObject(); textShadowGO = new GameObject(); textMeshGO.name = "TextMeshObject"; theMesh = textMeshGO.AddComponent <TextMesh> (); theShadow = textShadowGO.AddComponent <TextMesh> (); theShadow.color = Color.black; theMesh.transform.rotation = (Quaternion.Euler(90, 90, 0)); theShadow.transform.rotation = (Quaternion.Euler(90, 90, 0)); theMesh.anchor = TextAnchor.MiddleCenter; theShadow.anchor = TextAnchor.MiddleCenter; theCollider = textMeshGO.AddComponent <BoxCollider> (); theCollider.center = Vector3.zero; maxSpeed = 0.2f; minSpeed = 0.005f; isTouchingThis = false; adjustX = new SoftFloat(0.0f); adjustX.setSpeed(3.0f); adjustX.setTransformation(TweenTransforms.cubicOut); adjustZ = new SoftFloat(0.0f); adjustZ.setSpeed(6.0f); adjustX.setTransformation(TweenTransforms.cubicOut); //selfPositioning = false; }
// Use this for initialization new void Start() { intensity = new SoftFloat(); intensity.setSpeed(speed); light.intensity = minIntensity; }
private bool IsIdentical(SoftFloat f1, float f2) { return f1.ToIeeeRaw() == ((SoftFloat)f2).ToIeeeRaw(); }
public bool IsIdentical(SoftFloat f1, uint i) { return f1.ToIeeeRaw() == i; }
public bool IsIdentical(SoftFloat f1, SoftFloat f2) { return f1.ToIeeeRaw() == f2.ToIeeeRaw(); }