void Start() { checkLives = GameObject.Find("Lives").GetComponent <CheckpointLives>(); //Find and assign the Script associated with the game object char2D = GameObject.Find("Player").GetComponent <CharController2D>(); //Find and assign the Script associated with the game object invisWall = GameObject.Find("BossWall").GetComponent <InvisWall>(); //Find and assign the Script associated with the game object bossScene1 = GameObject.Find("BossTrigger").GetComponent <BossScene1>(); //Find and assign the Script associated with the game object hitCount = checkLives.lives; }
void Awake() { //_animator = GetComponent<Animator>(); _controller = GetComponent <CharController2D>(); // listen to some events for illustration purposes _controller.onTriggerEnterEvent += onTriggerEnterEvent; }
public void setMessageMode(bool mode) { char2D = gameObject.GetComponent <CharController2D>(); //<CLASS NAME> //Check if the player is in the air if (char2D.gravity > 0.0f) { print("true"); } }
// Use this for initialization void Start() { player = GameObject.FindWithTag("Player"); _controller = player.GetComponent <CharController2D> (); _playerMovement = player.GetComponent <PlayerMovement> (); minX = GetComponent <Collider2D> ().bounds.min.x; maxX = GetComponent <Collider2D> ().bounds.max.x; minY = GetComponent <Collider2D> ().bounds.min.y; maxY = GetComponent <Collider2D> ().bounds.max.y; }
// Update is called once per frame void Update() { timeleft -= Time.deltaTime; timerText.text = Mathf.RoundToInt(timeleft).ToString(); if (timeleft < 0) { if (CharController2D.isAlive) { CharController2D.Die(); } } }
// Set default camera on Startup void Start() { movement2D = GameObject.Find("Player").GetComponent <CharController2D>(); //"OBJECT NAME" <CLASS NMAE> movement3D1 = GameObject.Find("Player").GetComponent <CharController3D1>(); //"OBJECT NAME" <CLASS NMAE> movement3D2 = GameObject.Find("Player").GetComponent <CharController3D2>(); //"OBJECT NAME" <CLASS NMAE> timerView3d = GameObject.Find("TimerView3d"); //"OBJECT NAME" <CLASS NMAE> intTime = (int)playerTime; timerView3d.guiText.text = "3DTimer : " + intTime.ToString(); cam2D.camera.enabled = true; cam3D1.camera.enabled = false; cam3D2.camera.enabled = false; }
// Use this for initialization void Start() { char2D = GameObject.Find("Player").GetComponent <CharController2D>(); //"OBJECT NAME" <CLASS NAME> char3D1 = GameObject.Find("Player").GetComponent <CharController3D1>(); //"OBJECT NAME" <CLASS NAME> }
void Start() { CharController = GameObject.Find("Player").GetComponent <CharController2D>(); //"OBJECT NAME" <CLASS NMAE> }
private void Start() { charController = FindObjectOfType <CharController2D>(); }
public bool inAir = false; //Detects if AI is not Grounded // Use this for initialization void Start() { charControl = GameObject.Find("Player").GetComponent <CharController2D>(); //Find and assign the Script associated with the game object cameraListen = GameObject.Find("CameraListener").GetComponent <CameraListener>(); //Find and assign the Script associated with the game object }
void Start() { isAlive = true; Instance = this; SoundManager.Instance.PlayOneShot(SoundManager.Instance.respawn); }
public void Awake() { Health = MaxHealth; _controller = GetComponent<CharController2D>(); _isFacingRight = transform.localScale.x > 0; }
void Start() { controller = GetComponent <CharController2D>(); }