Пример #1
0
 public void Initialize(Action onDeath, double reference, CombatResObj combatResObj)
 {
     this.combatResObjInstance       = combatResObj;
     this.enemySpriteRenderer.sprite = combatResObj.gameSprite;
     this.reference = reference;
     onDeath       += moveableObject.LockHorizontalMovement;
     onDeath       += RemoveDamageHitbox;
     hittableObject.Initialize(onDeath, reference);
     this.playerStats.UpdateMaxHealth(reference, 0);
     this.playerStats.SetValues(combatResObj.baseAttack, combatResObj.attackScaling, combatResObj.baseDefence, combatResObj.defenceScaling, combatResObj.baseMaxHealth, combatResObj.healthScaling);
     this.damageInteractable.Initialize(this);
 }
Пример #2
0
    public override void DoInitialize()
    {
        this.mapType           = MapType.COMBAT;
        this.combatResInstance = this.combatRes.GetRandomResObject();
        this.levelIconSprite   = this.combatResInstance.gameSprite;

        immovableWall.gameObject.SetActive(mustKillEnemyToAdvance);
        cameraResetter.gameObject.SetActive(!mustKillEnemyToAdvance);

        this.logController = GameManager.Instance.gameController.logController;
        this.enemy.Initialize(this.OnEnemyDeath, reference, this.combatResInstance);
        this.cameraResetter.Initialize(this.OnSkip);
    }