// Start is called before the first frame update void Start() { startRot = transform.rotation.eulerAngles; animBasic = GetComponent <Animate_Basic>(); //animBasicPistonA = piston.GetComponent<Animate_Basic>(); //animBasicPistonB = piston.GetComponent<Animate_Basic>(); inCollider = piston.GetComponent <BoxCollider2D>(); outCollider = piston.GetComponent <PolygonCollider2D>(); audioSource = GetComponent <AudioSource>(); }
// Start is called before the first frame update void Start() { animBasic = GetComponent <Animate_Basic>(); foreach (GameObject morp in morpsConnected) { //morp.GetComponent<AlienBase>().SetAttached(); } foreach (GameObject connector in connectors) { connectorList.Add(connector); } foreach (GameObject morp in morpsConnected) { morpsConnectedList.Add(morp); } }
private IEnumerator AnimateRace() { Animate_Basic bushAnimator = GetComponent <Animate_Basic>(); Tween tempTweener; isAnimating = true; tempTweener = bushAnimator.Animate(AnimationTweenType.Move, bushStart.transform.position, Vector2.zero); yield return(new WaitForSeconds(tempTweener.Duration())); tempTweener = bushAnimator.Animate(AnimationTweenType.Scale, Vector2.zero, Vector2.zero); //tempTweener = bushAnimator.Animate(AnimationTweenType.RotateZ, Vector2.zero, Vector2.zero); yield return(new WaitForSeconds(tempTweener.Duration())); isAnimating = false; // Raise event or something }
void Start() { hand = GameObject.FindGameObjectWithTag("hand"); rb = GetComponent <Rigidbody2D>(); animBasic = GetComponent <Animate_Basic>(); jointHand.enabled = false; jointHand.connectedBody = hand.GetComponent <Rigidbody2D>(); //handRB = hand.GetComponent<Rigidbody2D>(); originalScale = transform.localScale; if (transform.parent != null) { myParent = transform.parent.gameObject; } capsuleColl = GetComponent <CapsuleCollider2D>(); polyColl = GetComponent <PolygonCollider2D>(); boxColl = GetComponent <BoxCollider2D>(); audioSource = GetComponent <AudioSource>(); if (shapeType == "squareHole") { OnGorpSpawn(isCrushed); } if (myParent == null && shapeType == "circleHole") { MorpSpriteRend.sprite = MorpCut; } else if (shapeType == "circleHole") { MorpSpriteRend.sprite = MorpUncut; } if (isDark.Value == true) { e_GlowOn(); } }
private void Start() { animBasic = GetComponent <Animate_Basic>(); }