Example #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;
    }
 private void Awake()
 {
     _sharedPlayerStats.SetFromBlueprint(_blueprintPlayerStats);
     rends = GetComponentsInChildren <MeshRenderer>();
 }