예제 #1
0
    private void Start()
    {
        var player = GameObject.Find("Player");

        pDamage   = player.GetComponent <PlayerDamage>();
        pControls = player.GetComponent <Player_Move_Prot>();
        smoke     = PlayerSmokeParticle.GetComponent <ParticleSystem>();
    }
예제 #2
0
 // Use this for initialization
 void Start()
 {
     audioSource_Pain = GetComponents <AudioSource>()[2];
     inventory        = GetComponent <Inventory>();
     rbody            = GetComponent <Rigidbody2D>();
     playerMove       = GetComponent <Player_Move_Prot>();
     spriteRenderer   = GetComponent <SpriteRenderer>();
 }
예제 #3
0
    // Use this for initialization
    void Start()
    {
        user = FindObjectOfType <Player_Move_Prot> ();

        if (user.transform.localScale.x < 0)
        {
            speed = -speed;
        }
        flipSprite();
    }
예제 #4
0
 // Use this for initialization
 private void Awake()
 {
     player = GameObject.FindGameObjectWithTag("Player");
     player.transform.position = gameObject.transform.position;
     rigidBody2D          = player.GetComponent <Rigidbody2D>();
     rigidBody2D.bodyType = RigidbodyType2D.Dynamic;
     movement             = player.GetComponent <Player_Move_Prot>();
     movement.GroundCheck = GroundCheck;
     movement.groundLayer = groundLayer;
 }
예제 #5
0
    private void Start()
    {
        TotalPickupsInWorld = GameObject.FindGameObjectsWithTag("Pickup").Length;
        PlayerScript        = GetComponent <Player_Move_Prot>();
        MaxHealthBarWidth   = HealthBar.GetComponent <RectTransform>().sizeDelta.x;
        MaxEnergyBarWidth   = EnergyBar.GetComponent <RectTransform>().sizeDelta.x;

        if (StartWithAllEquip)
        {
            Equipment.Add(EquipmentEnum.BlinkDrive);
            Equipment.Add(EquipmentEnum.CloudTread);
            Equipment.Add(EquipmentEnum.PhaseWalk);
        }
    }
예제 #6
0
 void Start()
 {
     player = GetComponent <Player_Move_Prot>();
 }