Exemple #1
0
 public void Awake()
 {
     this.buoyCounter.SetActive(false);
     this.mazeManager = FindObjectOfType<WaterMazeManager>();
     this.player = FindObjectOfType<Player>();
     Invalidate();
 }
Exemple #2
0
        void Start()
        {
            player = GameObject.FindGameObjectWithTag("Player").GetComponent<Player>();
            playerRigidbody = player.GetComponent<Rigidbody>();

            swimConstraints = RigidbodyConstraints.FreezeRotation;
        }
 private void Start()
 {
     //Default state is deactive for the machine
     currentState = State.Inactive;
     inTrigger = false;
     player = GameObject.FindGameObjectWithTag("Player").GetComponent<Player>();
 }
        void Start()
        {
            animator = GetComponentInParent<Animator>();
            player = GameObject.FindGameObjectWithTag("Player").GetComponent<Player>();

            endMarker = new Vector3(slider.transform.position.x, slider.transform.position.y - 15f, slider.transform.position.z + 1f);
        }
        public void Awake()
        {
            animator = GetComponent<Animator>();
            player = FindObjectOfType<Player>();
            renderers = GetComponentsInChildren<MeshRenderer>().ToList();

            SetVisible(false, Color.clear);
        }
 void Start()
 {
     vuurtje = GetComponentInChildren<ParticleSystem>();
     player = GameObject.FindGameObjectWithTag("Player").GetComponent<Player>();
     pigModel = GameObject.FindGameObjectWithTag("PigModel");
     pigColor = GameObject.FindGameObjectWithTag("PigColor");
     vuurtje.Stop();
     ColorUtility.TryParseHtmlString("#492200FF", out newColor);
 }
        public void OnTriggerEnter(Collider collider)
        {
            actor = collider.gameObject.GetComponent<Player>();

            if (actor != null && Onesie != null)
            {
                actor.AddOnesie(Onesie);
                Destroy(gameObject);
            }
        }
        public void OnTriggerEnter(Collider coll)
        {
            connected = coll.gameObject.GetComponent<Player>() != null;
            player = coll.gameObject.GetComponent<Player>();

            if (player != null) {
                x = player.transform.position.x;
                y = player.transform.position.y;
                z = player.transform.position.z;
            }
        }
 public void Awake()
 {
     this.player = FindObjectOfType<Player>();
     this.skillsUi = GameObject.Find("HUD/Skills");
     this.sprites = new Sprite[] {
         Resources.Load<Sprite>("HUD/OnesieIdle"),
         Resources.Load<Sprite>("HUD/OnesieIdleController"),
         Resources.Load<Sprite>("HUD/OnesieElephant"),
         Resources.Load<Sprite>("HUD/OnesieElephantController"),
         Resources.Load<Sprite>("HUD/OnesieHamster"),
         Resources.Load<Sprite>("HUD/OnesieHamsterController"),
         Resources.Load<Sprite>("HUD/OnesieDragon"),
         Resources.Load<Sprite>("HUD/OnesieDragonController")
     };
 }
 public void Awake()
 {
     this.collider = GetComponentInChildren<Collider>().gameObject;
     this.player = FindObjectOfType<Player>();
 }
 public void Awake()
 {
     player = GameObject.FindGameObjectWithTag("Player").GetComponent<Player>();
     rigidBody = GetComponent<Rigidbody>();
     rigidBody.constraints = RigidbodyConstraints.FreezeRotation;
 }
 void Start()
 {
     player = GameObject.FindGameObjectWithTag("Player").GetComponent<Player>();
     rb = GetComponent<Rigidbody>();
 }
 public void OnLevelWasLoaded(int index)
 {
     try
     {
         player = FindObjectOfType<Player>();
         playerController = FindObjectOfType<PlayerController>();
         SpawnPoint = GameObject.Find("Level/Spawn Point").transform;
     }
     catch (Exception) { }
 }
 void Start()
 {
     player = GameObject.FindGameObjectWithTag("Player").GetComponent<Player>();
     inTrigger = false;
 }
 void Start()
 {
     player = GameObject.FindGameObjectWithTag("Player").GetComponent<Player>();
     playerController = player.gameObject.GetComponent<PlayerController>();
 }
Exemple #16
0
 void Start()
 {
     player = GameObject.FindGameObjectWithTag("Player").GetComponent<Player>();
     nut = GameObject.Find("Nut");
     popup = GameObject.Find("CenterFocus").GetComponent<OnesieInfoPopup>();
 }
 void Start()
 {
     player = GameObject.FindGameObjectWithTag("Player").GetComponent<Player>();
     BoilerLid = GameObject.Find("PressurePlate").GetComponent<BoilerPressurePlate>();
 }
 private void Awake()
 {
     this.mainCamera = Camera.main.transform;
     this.player = GetComponent<Player>();
     this.switchAnimation = FindObjectOfType<OnesieSwitch>();
 }