// Use this for initialization void Start() { rb = GetComponent <Rigidbody2D>(); animatorEnemy = GetComponent <Animator>(); sprite = GetComponent <Spriter2UnityDX.EntityRenderer>(); player = GameObject.Find("Player").GetComponent <Character>(); }
private void Start() { // костыль для колчанов у лукарей, иначе отображаются выше леера юнитов :( Spriter2UnityDX.EntityRenderer entityRenderer = this.GetComponentInChildren <Spriter2UnityDX.EntityRenderer>(); entityRenderer.ApplySpriterZOrder = false; entityRenderer.ApplySpriterZOrder = true; }
// Use this for initialization void Start() { animator = GetComponent <Animator>(); EfirePos = transform.Find("EBulletPos"); sprite = GetComponent <Spriter2UnityDX.EntityRenderer>(); player = GameObject.Find("Player").GetComponent <Character>(); }
// Use this for initialization void Start() { ren = GetComponent <Spriter2UnityDX.EntityRenderer>(); GetComponent <BoxCollider2D>().isTrigger = false; anim = GetComponent <Animator>(); rb = GetComponent <Rigidbody2D>(); iniAlpha = ren.Color.a; }
// Use this for initialization void Start() { rb = GetComponent <Rigidbody2D>(); animatorEnemy = GetComponent <Animator>(); sprite = GetComponent <Spriter2UnityDX.EntityRenderer>(); player = GameObject.Find("Player").GetComponent <Character>(); interval = 250; enemyHealth = 100; animatorEnemy.Play("1_IDLE"); }
private void Awake() { anim = GetComponentInChildren <Animator>(); TargetsInRange = new List <Transform>(); movementSpeed = EnemyData.MovementSpeed; attackStrength = EnemyData.AttackStrength; attackSpeed = EnemyData.AttackSpeed; GetComponent <Health>().InitMaxHealth(EnemyData.Health); spriteRenderer = GetComponent <SpriteRenderer>(); entityRenderer = GetComponent <Spriter2UnityDX.EntityRenderer>(); }
// Use this for initialization void Start() { if (savepoint && SceneManager.GetSceneByName("Scenario2").isLoaded) { gameObject.transform.position = new Vector3(106.78f, -1.51f, 0f); savepoint = false; } Rigidbody2D = GetComponent <Rigidbody2D>(); animator = GetComponent <Animator>(); sprite = GetComponent <Spriter2UnityDX.EntityRenderer>(); checkpoint.Add(new Vector3(40.76451f, -2.166512f, 0)); checkpoint.Add(new Vector3(64.09798f, -2.13701f, 0)); checkpoint.Add(new Vector3(23.74f, -2.56f, 0)); checkpoint.Add(new Vector3(51.6f, -2.56f, 0)); checkpoint.Add(new Vector3(111.8f, -2.56f, 0)); health = 100; gamefinished = false; firePos = transform.Find("BulletPos"); //StartCoroutine(StartMainStory()); }
// Use this for initialization void Start() { ren = GetComponent <Spriter2UnityDX.EntityRenderer>(); GetComponent <BoxCollider2D>().isTrigger = false; anim = GetComponent <Animator>(); rb = GetComponent <Rigidbody2D>(); iniAlpha = ren.Color.a; jumpSource = gameObject.AddComponent <AudioSource>(); jumpSource.clip = jumpSFX; landSource = gameObject.AddComponent <AudioSource>(); landSource.clip = landSFX; dieSource = gameObject.AddComponent <AudioSource>(); dieSource.clip = dieSFX; winSource = gameObject.AddComponent <AudioSource>(); winSource.clip = winSFX; audioList = GetComponents <AudioSource>(); foreach (AudioSource audio in audioList) { audio.volume = PlayerPrefs.GetFloat("SFXvolume"); audio.playOnAwake = false; } }