// Use this for initialization void Start () { _renderer = GetComponent<SpriteRenderer>(); _playerController = GameObject.Find ("Player").GetComponent<RobbeController>(); baseColor = new Color(_renderer.color.r, _renderer.color.g, _renderer.color.b, _renderer.color.a); Invoke("Fading", 2.0f); Invoke ("DownForce", 1.0f); }
// Use this for initialization void Start () { //start with the boss laughter and idle state _playerController = GameObject.Find ("Player").GetComponent<RobbeController>(); Laugh(true); audio.PlayOneShot(bullyClips[1], 0.85f); }
void Start () { //Set up render configs _renderer = GetComponent<SpriteRenderer>(); _armRender = GameObject.Find ("GoblinBossArm").GetComponent<SpriteRenderer>(); _headRender = GameObject.Find ("GoblinBossHead").GetComponent<SpriteRenderer>(); _playerController = GameObject.Find ("Player").GetComponent<RobbeController>(); baseColor = new Color(_renderer.color.r, _renderer.color.g, _renderer.color.b, _renderer.color.a); armBaseColor = new Color(_armRender.color.r, _armRender.color.g, _armRender.color.b, _armRender.color.a); headBaseColor = new Color(_headRender.color.r, _headRender.color.g, _headRender.color.b, _headRender.color.a); //get WispCount script _defeatedWisps = GameObject.Find ("WispCount").GetComponent<GoblinWispCount>(); }
void GhostMover () { _playerController = GameObject.Find ("Player").GetComponent<RobbeController>(); _position = GameObject.Find ("Player").transform.position; { xPos = _position.x ; } if(_playerController._right) { if(_playerController.playervelocity.x == 0) { int hop = Random.Range (0,4); xPos = _position.x - hop; } else { xPos = _position.x - 3.0f; } } else if(!_playerController._right) { if(_playerController.playervelocity.x == 0) { int hop = Random.Range (0,4); xPos = _position.x + hop; } else { xPos = _position.x + 3.0f; } } Vector3 pos = new Vector3(Mathf.Clamp(xPos, 0.0f, 39.0f), transform.position.y, transform.position.z); this.transform.position = pos; //Debug.Log("New postiont is: "+this.transform.position); Invoke("GhostMover", 2.0f); }
// Use this for initialization void Awake () { WolfWalkInitialize(); ColorInitialize(); _playerController = GameObject.Find ("Player").GetComponent<RobbeController>(); }
// Use this for initialization void Awake () { _playerController = GameObject.Find ("Player").GetComponent<RobbeController>(); _bullyClips = GameObject.Find ("Boss").GetComponent<Ball_Boss>().bullyClips; }
void Awake() { transform = gameObject.transform; _playerController = target.GetComponent<RobbeController>(); }
void Awake() { //grab script components _player = GameObject.Find("Player").GetComponent<CharacterController2D>(); _audioPlayer = GameObject.Find ("Player").GetComponent<RobbeController>(); }