Ejemplo n.º 1
0
 private void Start()
 {
     _lockOn  = FindObjectOfType <Lock_On>();
     target.x = _lockOn.targetX;
     target.y = _lockOn.targetY;
     rb       = GetComponent <Rigidbody2D>();
 }
Ejemplo n.º 2
0
 // Use this for initialization
 void Start()
 {
     score     = FindObjectOfType <ScoreScript>();
     curHealth = health;
     _lockOn   = FindObjectOfType <Lock_On>();
     _targeted = FindObjectOfType <IsTargeted>();
 }
Ejemplo n.º 3
0
 // Use this for initialization
 void Awake()
 {
     firePoint = transform.Find("FirePoint");
     if (firePoint == null)
     {
         Debug.LogError("FirePoint not found. Check inspector.");
     }
     _lockOn = FindObjectOfType <Lock_On>();
 }
Ejemplo n.º 4
0
    // Use this for initialization
    void Start()
    {
        _sm       = FindObjectOfType <SoundManager>();
        _world    = FindObjectOfType <World>();
        _score    = FindObjectOfType <ScoreScript>();
        curHealth = health;
        _lockOn   = FindObjectOfType <Lock_On>();
        _targeted = FindObjectOfType <IsTargeted>();
        _wood     = FindObjectOfType <WoodScript>();
        _stone    = FindObjectOfType <StoneScript>();

        if (_score.scoreValue > 10)
        {
            health = (health * 2);
            if (_score.scoreValue > 20)
            {
                health = (health + 40);
                if (_score.scoreValue > 50)
                {
                    health = (health * 2);
                }
            }
        }
    }
Ejemplo n.º 5
0
 private void Start()
 {
     lockOn = FindObjectOfType <Lock_On>();
     weapon = FindObjectOfType <Weapon>();
 }