private void Start() { mats = new Material[1]; mats[0] = new Material(grayscale); shakeSource = GetComponent <Cinemachine.CinemachineImpulseSource>(); }
void Start() { this.impulseSource = GetComponent <Cinemachine.CinemachineImpulseSource>(); this.nextTransform = point2; this.playerTransform = GameObject.FindGameObjectWithTag("Player").GetComponent <Transform>(); }
// Start is called before the first frame update void Awake() { EffectsAnimator = this.GetComponent <Animator>(); AudioPlayer = this.GetComponent <AudioSource>(); CameraShaker = this.GetComponent <Cinemachine.CinemachineImpulseSource>(); smallWooshes = new List <AudioClip>(); smallWooshes.Add(Swoosh1); smallWooshes.Add(Swoosh2); smallWooshes.Add(Swoosh3); }
// Start is called before the first frame update void Start() { this.animator = GetComponent <Animator>(); this.hitboxManager = GetComponent <HitboxManager>(); this.spriteRenderer = GetComponent <SpriteRenderer>(); this.impulseSource = GetComponent <Cinemachine.CinemachineImpulseSource>(); this.animationManager = new AnimationManager(animator, this); characterDetector.AddListener(this); this.defaultSpriteMaterial = spriteRenderer.material; this.bossRetreatThreshold = this.health / 2; enemyManager = (EnemyManager)FindObjectOfType(typeof(EnemyManager)); if (!isBoss) { enemyManager.IncrementTrashEnemies(); } else { enemyManager.SetListener(this); } }
// Use this for initialization void Start() { MyInpulse = GetComponent <Cinemachine.CinemachineImpulseSource>(); }
private void Awake() { cameraShake = GetComponent <CinemachineImpulseSource>(); }
void Start() { this.deathImpulseSource = GetComponent <Cinemachine.CinemachineImpulseSource>(); }
private void OnCollisionEnter2D(Collision2D collision) { if (IsHeld == true) { return; } if (IsPlayer) { RatBrain brain = GetComponent <RatBrain>(); if (brain.IsYote == false) { return; } } if (_killMode == true) { Debug.Log("killhit " + collision.collider.gameObject.name); } if (collision.collider.CompareTag("Player") && _killMode && Kills) { RatPlayer yeeter = this.LastYeeter.GetComponent <RatPlayer>(); RatPlayer hit = collision.collider.GetComponent <RatPlayer>(); hit.Kill(); if (hit != yeeter) { yeeter.AwardPoint(); } Cinemachine.CinemachineImpulseSource impulse = GetComponent <Cinemachine.CinemachineImpulseSource>(); impulse?.GenerateImpulse(this.MyRigidbody.velocity); AudioManager.Instance.PlaySound(HitSFX, this.transform.position); if (!IsPlayer) { PoolManager.Instance.releaseObject(this.gameObject); } Cloud.Spawn(collision.contacts[0].point, Cloud.Size.Large); _killMode = false; } else { if (_killMode) { AudioManager.Instance.PlaySound(HitGroundSFX, collision.contacts[0].point, AudioManager.MixerGroup.SFX, 0.8f); Cloud.Spawn(collision.contacts[0].point, Cloud.Size.Small); } _killMode = false; } if (SpinOnThrow) { this.Animator?.Play("ItemSpin"); } else { this.Animator?.Play("ItemIdle"); } if (collision.collider.CompareTag("Planet")) { var r2d = GetComponent <Rigidbody2D>(); r2d.velocity = Vector3.zero; r2d.Sleep(); } if (IsPlayer) { ReleaseAndSetKinematic(); } }
private void Start() { shakeImpulse = GetComponent <Cinemachine.CinemachineImpulseSource>(); }
// Start is called before the first frame update void Start() { animator = player.GetComponentInChildren <Animator>(); attackInpulse = this.GetComponent <Cinemachine.CinemachineImpulseSource>(); }
// Start is called before the first frame update void Start() { ammoTray = GetComponentInChildren <AmmoTrayLogic>(); impulseSource = GetComponent <Cinemachine.CinemachineImpulseSource>(); anim = GetComponent <Animator>(); }
// Start is called before the first frame update void Start() { screenShake = GetComponent <Cinemachine.CinemachineImpulseSource>(); screenShake.GenerateImpulse(); }
public virtual void Fire(Vector3 direction) { rb.AddForce(direction * force, ForceMode.Impulse); source = GetComponent <Cinemachine.CinemachineImpulseSource>(); source.GenerateImpulse(Camera.main.transform.forward); }
void Start() { this.impulseSource = GetComponent <Cinemachine.CinemachineImpulseSource>(); this.audioSource = GetComponent <AudioSource>(); }
void Awake() { //Get the impulse source component _cameraShake = GetComponent <Cinemachine.CinemachineImpulseSource>(); }