public override void SetDamageColliderInfo(int _damage, string _tagName, Vector2 _attackForce, GameObject _order, bool _autoDistroy = true) { m_sTagName = _tagName; orderObject = _order; m_damage = _damage; attackForce = _attackForce; autoDistroy = _autoDistroy; m_monsterInfo = m_monsterInfo ?? _order.transform.root.GetComponent <MonsterInfo>(); m_cinemachineImpulse = m_cinemachineImpulse ?? this.GetComponent <CinemachineImpulseSource>(); m_projectile = this.GetComponent <RooteeProjectile>(); }
public void SkillAction(bool _left, int _damage) { int tempInt = 1; if (_left) { tempInt = -1; } m_projectileObject = ObjectPool.Inst.PopFromPool("RooteeProjectile"); m_projectileObject.GetComponent <MonsterShootAttackCollider>().SetDamageColliderInfo(_damage, "Player", new Vector2(3.0f * tempInt, 1.0f), m_monster, true); m_projectileComponent = m_projectileObject.GetComponent <RooteeProjectile>(); m_projectileObject.SetActive(true); m_projectileComponent.Fire(this.transform.position, _left); }