Exemplo n.º 1
0
    public void OnInit(PlayerProjectileAttackLogic logic, PlayerProjectileAttackConfig config)
    {
        m_Logic          = logic;
        m_Config         = config;
        m_PlayerTag      = logic.GetOwner().tag;
        m_ProjectileSFX  = AttackConfig.Instance.m_ProjectileSFX;
        m_ProjectileType = GetProjectileType();

        m_Animator.SetInteger(K_ANIM_ANGLE_INT, Mathf.FloorToInt(m_Config.m_ProjectileAngle));
        m_Animator.SetBool(K_ANIM_ISSUPER_BOOL, m_Logic.IsASuper());
        m_Animator.SetBool(K_ANIM_ISGUARDCRUSH_BOOL, m_Logic.IsGuardCrush());

        InitPalette();
        PlaySFX(EProjectileSFXType.Movement);

        Utils.GetPlayerEventManager(m_PlayerTag).TriggerEvent(EPlayerEvent.ProjectileSpawned, new ProjectileSpawnedEventParameters(this));

        GamePauseMenuComponent.IsInPauseChanged += IsInPauseChanged;
    }
 public PlayerProjectileAttackLogic(PlayerProjectileAttackConfig config) : base(config)
 {
     m_Config = config;
 }