示例#1
0
    public override ProjectileBehaviour Clone()
    {
        WavyBehaviour behaviour = (WavyBehaviour)base.Clone();

        behaviour.m_magnitude = m_magnitude;
        behaviour.m_frequency = m_frequency;

        return(behaviour);
    }
示例#2
0
    protected override IProjData CreateData(Projectile p_projectile, ProjectileBehaviour p_behaviour, int p_id)
    {
        WavyBehaviour behaviour = (WavyBehaviour)p_behaviour;

        return(new WavyBehaviourData {
            ID = p_id,
            Speed = p_projectile.m_info.m_speed,
            Direction = new float3(p_projectile.m_direction.x, p_projectile.m_direction.y, 0),
            Frequency = behaviour.m_frequency,
            Magnitude = behaviour.m_magnitude,
            Axis = p_projectile.transform.right,
            SpriteRotation = -90,
            StartTime = Time.time
        });
    }