Ejemplo n.º 1
0
    void Awake()
    {
        sharedEnemyStats  = ScriptableObject.CreateInstance <SoSharedHumanoidStats>();
        _currentBlueprint = _blueprintEnemyStats[UnityEngine.Random.Range(0, _blueprintEnemyStats.Count)];
        sharedEnemyStats.SetFromBlueprint(_currentBlueprint);
        sharedEnemyAttackTime = ScriptableObject.CreateInstance <SoSharedAttackTime>();

        StartCoroutine(TryAttackPlayer());


        rends = GetComponentsInChildren <MeshRenderer>();

        spawnedPoint       = _sharedSpawnPositions.TakeRandomSlot();
        transform.position = spawnedPoint;
    }
Ejemplo n.º 2
0
 public void SetSharedStats(SoSharedHumanoidStats enemySharedStats, SoSharedAttackTime enemySharedAttackTime)
 {
     _enemySharedStats      = enemySharedStats;
     _enemySharedAttackTime = enemySharedAttackTime;
     lastHpValue            = _enemySharedStats.Hp;
 }