public void RefreshReferences() { door = GetComponent <Door> (); spikes = GetComponent <Spikes> (); ladder = GetComponent <Ladder> (); pullPush = GetComponent <PullPush> (); if (door != null) { interactableType = InteractableType.Door; } else if (spikes != null) { interactableType = InteractableType.Spikes; } else if (ladder != null) { interactableType = InteractableType.Ladder; } else if (pullPush != null) { interactableType = InteractableType.PullPush; } else { Debug.LogError("Error: Interactable component with no compatible component included."); Debug.Break(); } }
void Start() { pullPush = GetComponent <PullPush>(); controller = GetComponent <Controller2D>(); abilities = GetComponent <Abilities>(); animator = GetComponent <Animator>(); //ANIMATION }
void Awake() { // Setting up references. pullpush = GetComponent <PullPush>(); hold = GetComponent <Hold>(); groundCheck = transform.Find("GroundCheck"); ceilingCheck = transform.Find("CeilingCheck"); anim = GetComponent <Animator>(); }
void Start() { doubleJumpParticle = gameObject.transform.GetChild(6).GetChild(0).GetComponent <ParticleSystem>(); tripleJumpParticle = gameObject.transform.GetChild(7).GetChild(0).GetComponent <ParticleSystem>(); paintingSoundSource = gameObject.transform.GetChild(8).GetComponent <AudioSource>(); jumpSoundSource = gameObject.transform.GetChild(9).GetComponent <AudioSource>(); pullPush = GetComponent <PullPush>(); controller = GetComponent <Controller2D>(); abilities = GetComponent <Abilities>(); animator = GetComponent <Animator>(); //ANIMATION createSplat = GetComponent <CreateSplat>(); }
public override void Start() { base.Start(); collisions.faceDir = 1; //Face direction set to 1 levelmanager = FindObjectOfType <LevelManager>(); checkpoint = FindObjectOfType <Checkpoint>(); pullPush = GetComponent <PullPush>(); createSplat = GetComponent <CreateSplat>(); //dashParticle = transform.GetChild(3).gameObject; paintParticleGO = transform.GetChild(5).gameObject; paintParticles = paintParticleGO.transform.GetChild(0).GetComponent <ParticleSystem>(); graphicsTransform = gameObject.transform.FindChild("Graphics").transform; }
public override void Start() { base.Start(); collisions.faceDir = 1; //Face direction set to 1 levelmanager = FindObjectOfType <LevelManager>(); checkpoint = FindObjectOfType <Checkpoint>(); abilities = GetComponent <Abilities>(); pullPush = GetComponent <PullPush>(); dashParticle = transform.GetChild(3).gameObject; //uiManager = FindObjectOfType<UIManager>(); //splatter = FindObjectOfType<Splatter>(); graphicsTransform = gameObject.transform.FindChild("Graphics").transform; //StartCoroutine(SplatterControl()); }
void Awake() { // Setting up references. pullpush= GetComponent<PullPush>(); hold=GetComponent<Hold>(); groundCheck = transform.Find("GroundCheck"); ceilingCheck = transform.Find("CeilingCheck"); anim = GetComponent<Animator>(); }