// Use this for initialization void Start() { jungController = FindObjectOfType <JungHeadController>(); controller = FindObjectOfType <SwitchSpikeController>(); rb = GetComponent <Rigidbody2D>(); //rb.velocity=new Vector3(0f,0f,0f); }
// Use this for initialization void Start() { jgController = FindObjectOfType <JungHeadController>(); rb = GetComponent <Rigidbody2D>(); crate = FindObjectOfType <CrateController>(); rb.velocity = new Vector2(-speed, 0f); // go with speed in direcit -x Destroy(gameObject, 2f); //gameobject will have a life spawn of 2 seconds. }
// Use this for initialization void Start() { theBoss = FindObjectOfType <FlySteamPunkController>(); //crate=FindObjectOfType<CrateController>(); //explosion=crate.deadExplosion; jgController = FindObjectOfType <JungHeadController>(); fireRgB = GetComponent <Rigidbody2D>(); fireRgB.velocity = new Vector2(speed, 0f); Destroy(gameObject, 2f); }
// Use this for initialization void Start() { Scene currentScene = SceneManager.GetActiveScene(); sceneName = currentScene.name; theJung = FindObjectOfType <JungHeadController>(); theSpriteRenderer = GetComponent <SpriteRenderer>(); moveLeft = false; moveRight = false; action = false; startFire = false; isDying = false; isMoving = false; isJumping = false; isShooting = false; climbLadder = false; myRigidbody = GetComponent <Rigidbody2D>(); myAnim = GetComponent <Animator>(); theLevelManager = FindObjectOfType <LevelManager>(); SkinSelector(); }