void Start()
 {
     levelManagerScript = transform.GetComponent <LevelManager>();
     playerStatusScript = levelManagerScript.player.GetComponent <playerStatus>();
     enemyStatusScript  = levelManagerScript.enemy.GetComponent <AiScript>();
 }
 void Awake()
 {
     current    = this;
     difficulty = GameManagerScript.current.difficulties;
 }
Exemple #3
0
        public CharacterScript(MovementScript movementScript, LookScript lookScript, WeaponScript weaponScript, AiScript aiScript, GameObject weapon, InvincibleScript invincibleScript, GameObject parent)
        {
            _weapon = weapon;

            parent.AddScript(this);
            _parent.AddScript(movementScript);
            _parent.AddScript(lookScript);
            _parent.AddScript(weaponScript);
            if (invincibleScript != null)
            {
                _parent.AddScript(invincibleScript);
            }
            if (aiScript != null)
            {
                _parent.AddScript(aiScript);
            }

            weapon.AddComponent(weaponScript.GetTextureComponent());
        }