Exemplo n.º 1
0
 void OnTriggerEnter2D(Collider2D col)
 {
     if (col.gameObject.tag == "Player")
     {
         movement         = col.GetComponent <TopDownMovement>();
         movement.enabled = false;
         blackScreen.GetComponent <Panel_scr>().door = this;
         blackScreen.SetActive(true);
     }
 }
 public void Start()
 {
     kindlingText.text   = kindling.ToString();
     goldText.text       = gold.ToString();
     fuelLeftSeconds     = maxFuelSeconds;
     animator            = GetComponent <Animator>();
     movementScript      = GetComponent <TopDownMovement>();
     playerInputs        = GetComponent <PlayerInputs>();
     startingBgIntensity = torchLightBg.intensity;
     startingFgIntensity = torchLightFg.intensity;
     startingGIntensity  = globalLight.intensity;
     startingColor       = new Color(4f, 2f, 0f, 1f);
     material.SetColor("_Color", startingColor);
     soundController = GameObject.FindGameObjectWithTag("Ladder").GetComponent <SoundController>();
     musicController = GameObject.FindGameObjectWithTag("MusicController").GetComponent <MusicController>();
 }
 // Start is called before the first frame update
 void Start()
 {
     _movement = SnowDoubtController.Instance.PlayerMovements[0];
 }
Exemplo n.º 4
0
	void Start()
	{
		rb = GetComponent<Rigidbody>();
		instace = this;
	}