// Use this for initialization void Start() { questionManagerScript = questionManager.GetComponent <QuestionManager>(); monster = questionManagerScript.GetMonsterData(); EffectManager.onAtkBuffStart += ApplyBoostDamage; EffectManager.onAtkBuffRemove += ResetDamage; player = questionManagerScript.GetPlayerData(); cachedY = enemyHealthTranform.position.y; maxXValue = enemyHealthTranform.position.x; minXValue = enemyHealthTranform.position.x - enemyHealthTranform.rect.width; currentHealth = maxHealth; }
// Use this for initialization void Start() { questionManagerScript = questionManager.GetComponent <QuestionManager>(); player = questionManagerScript.GetPlayerData(); monster = questionManagerScript.GetMonsterData(); // Debug.Log ("Monster Attack " + monster.Atk); cachedY = playerHealthTransform.position.y; maxXValue = playerHealthTransform.position.x; minXValue = playerHealthTransform.position.x - playerHealthTransform.rect.width; currentHealth = maxHealth; }