public void SetFromBlueprint(SoBlueprintHumanoidStats blueprint)
 {
     HumanoidName = blueprint.HumanoidName;
     Hp           = blueprint.Hp;
     Damage       = blueprint.Damage;
     Defense      = blueprint.Defense;
 }
Example #2
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;
    }