Exemplo n.º 1
0
    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();
        }
    }
Exemplo n.º 2
0
 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>();
 }
Exemplo n.º 4
0
 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>();
 }
Exemplo n.º 5
0
 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;
 }
Exemplo n.º 6
0
    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>();
 }