예제 #1
0
    private void Awake()
    {
        rigidbody     = GetComponent <Rigidbody2D>();
        currentHealth = maxHealth;
        gfx           = GetComponent <EnemyGFX>();

        playerLayer = LayerMask.GetMask("Player");
    }
예제 #2
0
    private void Start()
    {
        Item[] temp_itemMoneys = FindObjectsOfType <Item>();
        itemMoneys.AddRange(temp_itemMoneys);

        GFX_SCRIPT = GFX.GetComponent <EnemyGFX>();

        speed = UnityEngine.Random.Range(speed - 200.0f, speed + 200.0f);
    }