コード例 #1
0
    public virtual void AttackBegin()
    {
        m_InitialProjectilePosition    = transform.position;
        m_InitialProjectileRotation    = transform.rotation.eulerAngles;
        m_InitialProjectileRotation.y -= m_AttackStartingRot;

        for (int i = 0; i < m_AttackProjectileNumb; i++)
        {
            m_ProjectileRotation = Quaternion.Euler(m_InitialProjectileRotation.x, m_InitialProjectileRotation.y + (i * m_AttackSpread), m_InitialProjectileRotation.z);
            GameObject proj = (GameObject)GameObject.Instantiate(m_HeavyColliderPrefab,
                                                                 new Vector3(m_InitialProjectilePosition.x,
                                                                             m_InitialProjectilePosition.y + m_FirePointOffset,
                                                                             m_InitialProjectilePosition.z), m_ProjectileRotation);

            HeavyCollider collider = proj.GetComponent <HeavyCollider>();
            collider.LaunchProjectile(7, 1);
            collider.SetCharacter(m_ReadInput.ReadInputFrom);
        }
    }
コード例 #2
0
    //used for Combo_Y attack
    public virtual void HeavyAOEAttack()
    {
        m_InitialProjectilePosition = transform.position;
        m_InitialProjectileRotation = transform.rotation.eulerAngles;

        for (int i = 0; i < m_NumberOfAOEProjectiles; i++)
        {
            m_ProjectileRotation = Quaternion.Euler(m_InitialProjectileRotation.x, m_InitialProjectileRotation.y + (i * m_AOEProjectileAngle), m_InitialProjectileRotation.z);
            GameObject proj = (GameObject)GameObject.Instantiate(m_HeavyColliderPrefab,
                                                                 new Vector3(m_InitialProjectilePosition.x,
                                                                             m_InitialProjectilePosition.y + m_FirePointOffset,
                                                                             m_InitialProjectilePosition.z), m_ProjectileRotation);

            HeavyCollider collider = proj.GetComponent <HeavyCollider>();
            collider.LaunchProjectile(m_AOESpeed, m_AOERange);
            collider.SetCharacter(m_ReadInput.ReadInputFrom);
        }
        AOEEffect();
        RemoveChargingEffects();
    }